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<Gt, 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.


begin of advanced section

Setting

void v.set_face ( Face_handle f)
Sets 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 one of the two faces that are incident to the edge pointed to. A vertex circulator that turns around vertex v and and points to a vertex w, is invalidated by any modification of the faces incident to the edge vw.

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 v if f is omitted. Otherwise the circulator refers to the first edge of f incident to 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. If f is omitted, the circulator begins with an abitrary vertex incident to v, otherwise it begins with the vertex of face f that, in counterclockwise order around v, is the first vertex of f incident to v.
Precondition: Face f is incident to vertex v.


Next: Class declaration of Face
Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The GALIA project. Jan 18, 2000.