
\begin{ccRefConcept}[TriangulationDataStructure::]{Cell}


\ccDefinition
  
The concept \ccRefName\ stores
\ccc{Vertex_handle}s to its vertices and \ccc{Full_cell_handle}s
to its neighbors. The vertices are indexed $0, 1,\ldots,\cd$ in consistent
order.  The neighbor indexed $i$ lies opposite to vertex \ccc{i}.


\ccTypes
\ccThree{typedef TriangulationDataStructure::Full_cell_handle}{TriangulationDataStructure}{}
\ccThreeToTwo
The class \ccRefName\ defines the following types.

\ccTypedef{typedef TriangulationDataStructure Triangulation_data_structure;}{}
\ccGlue
\ccTypedef{typedef TriangulationDataStructure::Vertex_handle Vertex_handle;}{}
\ccGlue
\ccTypedef{typedef TriangulationDataStructure::Full_cell_handle Full_cell_handle;}{}

\ccCreation
\ccCreationVariable{c}  %% choose variable name
\ccThree{Full_cell_handle}{c.has_neighbor( Full_cell_handle n, int & i) const}{}

In order to obtain new cells or destruct unused cells, the user must call the
\ccc{new_full_cell()} and \ccc{delete_full_cell()} methods of the triangulation data
structure.

\ccOperations

\ccAccessFunctions

\ccMethod{Vertex_handle vertex(int i) const;}
{Returns the vertex \ccc{i} of \ccVar.
\ccPrecond{$i \in [0,\ad]$.}}
\ccGlue
\ccMethod{int index(Vertex_handle v) const;}
{Returns the index of vertex \ccc{v} in \ccVar.
\ccPrecond{\ccc{v} is a vertex of \ccVar}.}
\ccGlue
\ccMethod{bool has_vertex(Vertex_handle v) const;}
{Returns \ccc{true} if  \ccc{v} is a vertex of \ccVar.}
\ccGlue
\ccMethod{bool has_vertex(Vertex_handle v, int & i) const;}
{Returns \ccc{true} if \ccc{v} is a vertex of \ccVar, and
computes its index \ccc{i} in \ccVar.}

\ccMethod{Full_cell_handle neighbor(const int i) const;}
{Returns  the neighbor \ccc{i} of \ccVar. 
\ccPrecond{$i \in [0,\ad]$.}}
\ccGlue
\ccMethod{int index(Full_cell_handle n) const;}
{Returns the index corresponding to adjacent cell \ccc{n}.
\ccPrecond{\ccc{n} is a neighbor of \ccVar.}}
\ccGlue
\ccMethod{bool has_neighbor(Full_cell_handle n) const;}
{Returns \ccc{true} if \ccc{n} is a neighbor of \ccVar.}
\ccGlue
\ccMethod{bool has_neighbor(Full_cell_handle n, int & i) const;}
{Returns \ccc{true} if \ccc{n} is a neighbor of \ccVar,  and
computes its index \ccc{i} in \ccVar.}

\ccHeading{Setting}

\ccMethod{void set_vertex(int i, Vertex_handle v);}
{Sets vertex \ccc{i} to \ccc{v}.
\ccPrecond{$i \in [0,\ad]$.}}

\ccMethod{void set_neighbor(int i, Full_cell_handle n);}
{Sets neighbor \ccc{i} to \ccc{n}.
\ccPrecond{$i \in [0,\ad]$.}}

\begin{ccDebug}
\ccHeading{Checking}
\ccThree{Full_cell_handle}{c.is_valid(}{}

\ccMethod{bool is_valid(bool verbose = false) const;}
{User defined local validity checking function.}
\end{ccDebug}

\ccSeeAlso

\ccc{TriangulationDataStructure::Vertex}\\
\ccc{TriangulationDataStructure}.

\end{ccRefConcept}
