Navigation: Up, Table of Contents, Bibliography, Index, Title Page

A class Tds<Vb,Fb> that satisfies the requirements for a triangulation traits class must provide the following types and operations.

Tds<Vb,Fb>::Vertex
Requirement for this type are described in section reference arrow.

Tds<Vb,Fb>::Face
Requirements for this type are described in described reference arrow.

The following iterators allow to visit all the vertices, edges and faces of the triangulation data structure. They are all bidirectional, non mutable iterators.

Tds<Vb,Fb>::Face_iterator
Tds<Vb,Fb>::Edge_iterator
Tds<Vb,Fb>::Vertex_iterator

The following circulators allow to visit all the vertices, edges and faces incident to a given vertex. They are all bidirectional and non mutable.

Tds<Vb,Fb>::Face_circulator
Tds<Vb,Fb>::Edge_circulator
Tds<Vb,Fb>::Vertex_circulator

Creation

Tds<Vb,Fb> tds;
A default constructor.

Tds<Vb,Fb> tds ( Vertex* v);
Introduces a triangulation data structure tds that is initialized with a set of vertices and faces that are linked to vertex v. If v has no incident face the triangulation consists only of v. Otherwise v must be the vertex at infinity.

Tds<Vb,Fb> tds ( Tds tds1);
Copy constructor. All the vertices and faces are duplicated.

Tds tds = Tds tds1 Assignation. All the vertices and faces are duplicated.
void tds.swap ( Tds &tds1)
Swap tds and tds1. Should be preferred to tds= tds1 or tds(tds1) when tds1 is deleted after that.
void \ccTilde{ tds.\ccVar} () Destructor. All vertices and faces are deleted.

Access Functions

int tds.dimension () The dimension of the convex hull.
int tds.number_of_vertices ()
The number of finite vertices.

Finite and Infinite Vertices and Faces

bool tds.is_infinite ( Vertex* v)
true, iff vertex *v is the infinite_vertex.
bool tds.is_infinite ( Face* f)
true, iff one of the vertices of *f is the infinite_vertex.
bool tds.is_infinite ( Face* f, int i)
true, iff one of the vertices cw(i) or ccw(i) of face *f is the infinite_vertex.
bool tds.is_infinite ( Edge e)
true, iff one of the vertices of edge e is the infinite_vertex.
bool tds.is_infinite ( Edge_circulator& ec)
true, iff one of the vertices of edge e is the infinite_vertex.
bool tds.is_infinite ( Edge_iterator& ei e)
true, iff one of the vertices of edge *ei is the infinite_vertex.
Face* tds.infinite_face ()
A face incident to the infinite_vertex.
Vertex* tds.infinite_vertex ()
The infinite vertex.
Vertex* tds.finite_vertex ()
A vertex different from the infinite_vertex.

Setting

void tds.set_number_of_vertices ( int n)
void tds.set_finite_vertex ( Vertex* v)
void tds.set_infinite_vertex ( Vertex* v)

Modifiers

The following modifier member functions guarantee the combinatorial validity of the resulting triangulation.

void tds.flip ( Face* f, int i)
Exchange the edge incident to *f and f->neighbor(i) with the other diagonal of the quadrilateral formed by f and f->neighbor(i).

Flip

void tds.insert_first ( Vertex* v)
Insert the first finite vertex .
void tds.insert_second ( Vertex* v)
Insert the second finite vertex .
void tds.insert_in_face ( Vertex* v, Face* f)
Insert vertex v in face f. Face f is modified, two new faces are created

Insertion

void tds.insert_on_edge ( Vertex* v, Face* f, int i)
Insert vertex v in edge i of f*
void
tds.insert_collinear_outside ( Vertex * v,
Face * loc,
int li)
insert in a 1 dimensional triangulation a vertex which is collinear to the triangulation and outside the convex hull. loc->vertex(li) is the vertex of the triangulation closest to v.
void tds.remove_degree_3 ( Vertex* v, Face *f=NULL)
remove a vertex of degree 3. Two of the incident faces are destroyed, the third one is modified. If parameter f is specified, it has to be a face incident to v and will be the modified face.
Precondition: Vertex v is a finite vertex with degree 3 and, if specified, face f is incident to v.
void tds.remove_second ( Vertex* v)
remove the before last finite vertex.
void tds.remove_first ( Vertex* v)
remove the last finite vertex.
void tds.clear () Delete all faces and all finite vertices.

Traversing the triangulation

Face_iterator tds.faces_begin ()
Face_iterator tds.faces_end ()
Vertex_iterator tds.vertices_begin ()
Vertex_iterator tds.vertices_end ()
Edge_iterator tds.edges_begin ()
Edge_iterator tds.edges_end ()

Miscelleanous

int tds.ccw ( int i) Returns i+1 modulo 3.
Precondition: 0<=i <=2.
int tds.cw ( int i) Returns i+2 modulo 3.
Precondition: 0<=i <=2.
int tds.number_of_faces ()
Returns the number of finite faces.
bool tds.is_valid () Check the combinatorial validity of the triangulation.


Next: Class declaration of Tds::Vertex
Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The CGAL Project. 22 January, 1999.