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

Definition

An object d of the class Dcel that satisfies the requirements of a topological map's DCEL class must provide the following types and operations.

Types

Dcel::Vertex
vertex type.


Dcel::Halfedge
halfedge type.


Dcel::Face
face type.


Dcel::Size
type for size values.


Dcel::Vertex_iterator
a bidirectional iterator over the vertices. Its value-type is Vertex.


Dcel::Halfedge_iterator
a bidirectional iterator over the halfedges. Its value-type is Halfedge.


Dcel::Face_iterator
a bidirectional iterator over the faces. Its value-type is Face.

Creation

Dcel d;
constructs an empty DCEL with one outer face.

Operations

Size d.size_of_vertices ()
number of vertices.

Size d.size_of_halfedges ()
number of halfedges (always even).

Size d.size_of_faces () number of faces.

Vertex_iterator d.vertices_begin ()
returns the begin-iterator of the vertices in d.

Vertex_iterator d.vertices_end () returns the past-the-end iterator of the vertices in d.

Halfedge_iterator d.halfedges_begin ()
returns the begin-iterator of the halfedges in d.

Halfedge_iterator d.halfedges_end () returns the past-the-end iterator of the halfedges in d.

Vertex_iterator d.faces_begin () returns the begin-iterator of the faces in d.

Vertex_iterator d.faces_end () returns the past-the-end iterator of the faces in d.

The following operations allocate a new element of that type. Halfedges are always allocated in pairs of opposite halfedges. The twin pointers are automatically set.

Vertex* d.new_vertex () creates a default vertex.

Halfedge* d.new_edge () creates a new pair of opposite halfedges.

Face* d.new_face () creates a new face.

void d.delete_vertex ( Vertex* v)
deletes the vertex v.

void d.delete_edge ( Halfedge* h)
deletes the pair of opposite halfedges h.

void d.delete_face ( Face* f)
deletes the face f.


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