The cell class Tds::Cell of a triangulation data structure stores four pointers to its four vertices and four pointers to its four neighbors The vertices are indexed 0, 1, 2, and 3 in positive order. The neighbor indexed lies opposite to vertex i.
In degenerate dimensions, cells are used to store faces of maximal dimension: in dimension 2, each cell represents only one facet of index 3, and 3 edges , and ; in dimension 1, each cell represents one edge . (See also Section .)
| ||
|
||
|
|
The constructors of a cell do not insert it into any triangulation data structure. To add a cell into a given triangulation data structure, the add_cell() method of the triangulation data structure must be used. Note that a given cell can only be inserted into one triangulation data structure.
| |||
Introduces a cell c and initializes all vertices and neighbors
with NULL.
| |||
| |||
Introduces a cell c, and initializes its vertices. The neighbors
are initialized with NULL.
| |||
| |||
Introduces a cell c, and initializes its vertices and neighbors.
|
|
|
Returns the vertex i of c. Precondition: . |
|
| |
Returns the index of vertex v in c. Precondition: v is a vertex of c. | ||
|
| |
Returns true if v is a vertex of c. | ||
|
| |
Returns true if v is a vertex of c, and computes its index i in c. | ||
|
| |
Returns the neighbor i of c. Precondition: . | ||
|
| |
Returns the index corresponding to neighboring cell n. Precondition: n is a neighbor of c. | ||
|
| |
Returns true if n is a neighbor of c. | ||
|
| |
Returns true if n is a neighbor of c, and computes its index i in c. | ||
|
| |
Returns the vertex of the neighbor of cthat is opposite to c. Precondition: . | ||
|
| |
Returns the index of c in its neighbor. Precondition: . |
|
| |||
Sets vertex i to v. Precondition: . | ||||
|
| |||
Sets the vertex pointers. | ||||
|
| |||
Sets neighbor i to n. Precondition: . | ||||
|
| |||
Sets the neighbors pointers. |
|
| |
dim is the dimension of the triangulation, with default
value 3. In dimension 3 (resp. 2, 1) this function must check that the cell shares three (resp. two, one) vertices with its neighbors, and these neighbors have a correct reciprocal neighboring link. Moreover, the consistency of the orientations of common faces must be checked. The validity of all the vertices of the cell must be checked. The validity of the base cell is also checked. When verbose is set to true, messages are printed to give a precise indication of the kind of invalidity encountered. |