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

At the base level, a cell stores void* pointers to its four vertices and to its four neighbor cells. The vertices and neighbors are indexed 0, 1, 2 and 3. Neighbor i lies opposite to vertex i.

Creation

Cell_base c;
Cell_base c ( void* v0, void* v1, void* v2, void* v3);
Initializes the vertices with v0, v1, v2, v3. Neighbors are initialized to NULL.

Cell_base c ( void* v0,
void* v1,
void* v2,
void* v3,
void* n0,
void* n1,
void* n2,
void* n3);
Initializes the vertices with v0, v1, v2, v3 and the neighbors with n0, n1, n2, n3.

Access Functions

void* c.vertex ( int i) Returns the vertex i of c.
Precondition: i {0, 1, 2, 3}.
int c.vertex_index ( const void* v)
Returns the index of v.
Precondition: v is a vertex of c
bool c.has_vertex ( const void* v)
True iff v is a vertex of c.
bool c.has_vertex ( const void* v, int & i)
Returns true if v is a vertex of c, and computes its index i in c.

void* c.neighbor ( int i)
Returns the neighbor i of c.
Precondition: i {0, 1, 2, 3}.
int c.cell_index ( const void* n)
Returns the index of cell n in c.
Precondition: n is a neighbor of c.
bool c.has_neighbor ( void* n)
Returns true if n is a neighbor of c.
bool c.has_neighbor ( const void* n, int & i)
Returns true if n is a neighbor of c, and computes its index i in c.

Setting

void c.set_vertex ( int i, void* v)
Sets vertex i to v.
Precondition: i {0, 1, 2, 3}.
void c.set_vertices () Sets the vertices to NULL.
void
c.set_vertices ( void* v0,
void* v1,
void* v2,
void* v3)
Sets the vertices.

void c.set_neighbor ( int i, void* n)
Sets neighbor i to n.
Precondition: i {0, 1, 2, 3}.
void c.set_neighbors () Sets the neighbors to NULL.
void
c.set_neighbors ( void* n0,
void* n1,
void* n2,
void* n3)
Sets the neighbors.

Checking

bool c.is_valid ( bool verbose = false)
Performs any desired geometric test on a cell.
When verbose is set to true, messages are printed to give a precise indication of the kind of invalidity encountered.

I/O

istream& istream& is >> & c
Inputs the possible non combinatorial information given by the cell.
Precondition: This information has a corresponding operator >>.

ostream& ostream& os << c Outputs the possible non combinatorial information given by the cell.
Precondition: This information has a corresponding operator >>.


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