|
CGAL 4.7 - 3D Triangulation Data Structure
|
The concept TriangulationDataStructure_3::Cell stores four Vertex_handles to its four vertices and four Cell_handles to its four neighbors. The vertices are indexed 0, 1, 2, and 3 in consistent order. The neighbor indexed \( i\) 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 \( (0,1)\), \( (1,2)\) and \( (2,0)\); in dimension 1, each cell represents one edge \( (0,1)\). (See also Section Representation.)
Creation
In order to obtain new cells or destruct unused cells, the user must call the create_cell() and delete_cell() methods of the triangulation data structure.
Types | |
| typedef TriangulationDataStructure_3 | Triangulation_data_structure |
| typedef TriangulationDataStructure_3::Vertex_handle | Vertex_handle |
| typedef TriangulationDataStructure_3::Cell_handle | Cell_handle |
Access Functions | |
| Vertex_handle | vertex (int i) const |
Returns the vertex i of c. More... | |
| int | index (Vertex_handle v) const |
Returns the index of vertex v in c. More... | |
| bool | has_vertex (Vertex_handle v) const |
Returns true if v is a vertex of c. More... | |
| bool | has_vertex (Vertex_handle v, int &i) const |
Returns true if v is a vertex of c, and computes its index i in c. More... | |
| Cell_handle | neighbor (int i) const |
Returns the neighbor i of c. More... | |
| int | index (Cell_handle n) const |
Returns the index corresponding to neighboring cell n. More... | |
| bool | has_neighbor (Cell_handle n) const |
Returns true if n is a neighbor of c. More... | |
| bool | has_neighbor (Cell_handle n, int &i) const |
Returns true if n is a neighbor of c, and computes its index i in c. More... | |
Setting | |
| void | set_vertex (int i, Vertex_handle v) |
Sets vertex i to v. More... | |
| void | set_vertices (Vertex_handle v0, Vertex_handle v1, Vertex_handle v2, Vertex_handle v3) |
| Sets the vertex pointers. More... | |
| void | set_neighbor (int i, Cell_handle n) |
Sets neighbor i to n. More... | |
| void | set_neighbors (Cell_handle n0, Cell_handle n1, Cell_handle n2, Cell_handle n3) |
| Sets the neighbors pointers. More... | |
Checking | |
| bool | is_valid (bool verbose=false, int level=0) const |
| This is a function for debugging purpose. More... | |
| typedef TriangulationDataStructure_3::Cell_handle TriangulationDataStructure_3::Cell::Cell_handle |
| typedef TriangulationDataStructure_3 TriangulationDataStructure_3::Cell::Triangulation_data_structure |
| typedef TriangulationDataStructure_3::Vertex_handle TriangulationDataStructure_3::Cell::Vertex_handle |
| bool TriangulationDataStructure_3::Cell::has_neighbor | ( | Cell_handle | n | ) | const |
Returns true if n is a neighbor of c.
| bool TriangulationDataStructure_3::Cell::has_neighbor | ( | Cell_handle | n, |
| int & | i | ||
| ) | const |
Returns true if n is a neighbor of c, and computes its index i in c.
| bool TriangulationDataStructure_3::Cell::has_vertex | ( | Vertex_handle | v | ) | const |
Returns true if v is a vertex of c.
| bool TriangulationDataStructure_3::Cell::has_vertex | ( | Vertex_handle | v, |
| int & | i | ||
| ) | const |
Returns true if v is a vertex of c, and computes its index i in c.
| int TriangulationDataStructure_3::Cell::index | ( | Vertex_handle | v | ) | const |
Returns the index of vertex v in c.
v is a vertex of c. | int TriangulationDataStructure_3::Cell::index | ( | Cell_handle | n | ) | const |
Returns the index corresponding to neighboring cell n.
n is a neighbor of c. | bool TriangulationDataStructure_3::Cell::is_valid | ( | bool | verbose = false, |
| int | level = 0 |
||
| ) | const |
This is a function for debugging purpose.
User defined local validity checking function.
| Cell_handle TriangulationDataStructure_3::Cell::neighbor | ( | int | i | ) | const |
Returns the neighbor i of c.
| void TriangulationDataStructure_3::Cell::set_neighbor | ( | int | i, |
| Cell_handle | n | ||
| ) |
Sets neighbor i to n.
| void TriangulationDataStructure_3::Cell::set_neighbors | ( | Cell_handle | n0, |
| Cell_handle | n1, | ||
| Cell_handle | n2, | ||
| Cell_handle | n3 | ||
| ) |
Sets the neighbors pointers.
| void TriangulationDataStructure_3::Cell::set_vertex | ( | int | i, |
| Vertex_handle | v | ||
| ) |
Sets vertex i to v.
| void TriangulationDataStructure_3::Cell::set_vertices | ( | Vertex_handle | v0, |
| Vertex_handle | v1, | ||
| Vertex_handle | v2, | ||
| Vertex_handle | v3 | ||
| ) |
Sets the vertex pointers.
| Vertex_handle TriangulationDataStructure_3::Cell::vertex | ( | int | i | ) | const |
Returns the vertex i of c.