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

The Vertex Class of a Triangulation

Definition

The vertex stores a point, gives access to an incident face and provides circulators to visit all incident faces and edges and all adjacent vertices.

Inherits From

Tds::Vertex

Types

The class Vertex defines the same types as the class Triangulation_2<Tds> except for the iterators and the Line_face_circulator which are not needed.


begin of advanced section

Creation

For triangulation algorithms designed by the user, vertices need to be explicitly constructed. If the modification of the triangulation is done through a member of the triangulation class, there is no need for these functions.

Vertex v;
Introduces a new vertex. The geometric information is initialized by the default constructor of the class Point. The pointer to the incident face is initialized to NULL.

Vertex v ( Point p);
Introduces a variable v, and initializes the geometric information. The pointer to the incident face is initialized with NULL.

Vertex v ( Point p, Face_handle f);
Introduces a variable v, and initializes the geometric information and the pointer to the incident face.


end of advanced section

Access Functions

Point v.point () Returns the geometric information of v.
Face_handle v.face () Returns a face of the triangulation having v as vertex.

Setting


begin of advanced section

void v.set_face ( Face_handle f)
Set the incident face to f.


end of advanced section

Miscellaneous

int v.ccw ( int i) Returns i+1 modulo 3.
Precondition: 0<=i <=2.
int v.cw ( int i) Returns i+2 modulo 3.
Precondition: 0<=i <=2.
int v.degree () Returns the degree of v in the triangulation.
Vertex_handle v.handle () Returns an handle to the vertex.
bool v.is_valid () Check the validity of a vertex: i.e. the pointer to the incident face and call the is_valid() function of the base class to perform any geometric test provided by the user therein.

Traversal of the Adjacent Vertices, Incident Edges and Faces.

Three circulator classes allow to traverse the edges, and faces incident to a given vertex or the adjacent vertices. These circulators are bidirectional and their value types are respectively Vertex, Edge and Face. The operator++ moves the circulator counterclockwise around the vertex and the operator-- moves the circulator clockwise.

A face circulator is invalidated by any modification of the face it points to. An edge circulator is invalidated by any modification of the two faces that are incident to the edge pointed to. A vertex circulator that turns around vertex v and that has as value a pointer to vertex w, is invalidated by any modification of the two faces that are incident to v and w.

Face_circulator v.incident_faces ( Face_handle f=Face_handle())
A circulator for the incident faces that refers to face f or to an arbitrary face incident to v if f is omitted.
Precondition: Face f is incident to vertex v.
Edge_circulator v.incident_edges ( Face_handle f=Face_handle())
A circulator for the incident edges that refers to an abitrary edge incident to vertex v if f is omitted. Otherwise the circulator refers to the first edge of f incident to vertex v in counterclockwise order around v.
Precondition: Face f is incident to vertex v.
Vertex_circulator v.incident_vertices ( Face_handle f=Face_handle())
A circulator for the adjacent vertices that refers to the first vertex of face f incident to v in counterclockwise order around v or to an abitrary vertex incident to vertex v if f is omitted.
Precondition: Face f is incident to vertex v.


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