DGtal 1.4.2
|
Aim: This class represents an half-edge data structure, which is a structure for representing the topology of a combinatorial 2-dimensional surface or an embedding of a planar graph in the plane. It does not store any geometry. As a minimal example, these lines of code build two triangles connected by the edge {1,2}. More...
#include <DGtal/topology/HalfEdgeDataStructure.h>
Data Structures | |
struct | Edge |
struct | HalfEdge |
struct | Triangle |
Represents an unoriented triangle as three vertices. More... | |
Public Types | |
typedef std::size_t | Size |
The type for counting elements. | |
typedef std::size_t | Index |
The type used for numbering half-edges (an offset an the half-edges structure). | |
typedef Index | HalfEdgeIndex |
The type used for numbering half-edges (alias) | |
typedef Index | VertexIndex |
The type for numbering vertices. | |
typedef Index | EdgeIndex |
The type for numbering edges. | |
typedef Index | FaceIndex |
The type for numbering faces. | |
typedef std::vector< HalfEdgeIndex > | HalfEdgeIndexRange |
typedef std::vector< VertexIndex > | VertexIndexRange |
typedef std::vector< EdgeIndex > | EdgeIndexRange |
typedef std::vector< FaceIndex > | FaceIndexRange |
typedef std::pair< VertexIndex, VertexIndex > | Arc |
An arc is a directed edge from a first vertex to a second vertex. | |
typedef std::map< Arc, Index > | Arc2Index |
typedef std::map< Arc, FaceIndex > | Arc2FaceIndex |
typedef std::vector< VertexIndex > | PolygonalFace |
Public Member Functions | |
HalfEdgeDataStructure () | |
Default constructor. The data structure is empty. | |
bool | build (const Size num_vertices, const std::vector< Triangle > &triangles, const std::vector< Edge > &edges) |
bool | build (const Size num_vertices, const std::vector< PolygonalFace > &polygonal_faces, const std::vector< Edge > &edges) |
bool | build (const std::vector< Triangle > &triangles) |
bool | build (const std::vector< PolygonalFace > &polygonal_faces) |
void | clear () |
Clears the data structure. | |
Size | nbHalfEdges () const |
Size | nbVertices () const |
Size | nbEdges () const |
Size | nbFaces () const |
long | Euler () const |
const HalfEdge & | halfEdge (const Index i) const |
Arc | arcFromHalfEdgeIndex (const Index i) const |
Index | halfEdgeIndexFromArc (const VertexIndex i, const VertexIndex j) const |
Index | halfEdgeIndexFromArc (const Arc &arc) const |
Index | findHalfEdgeIndexFromArc (const VertexIndex i, const VertexIndex j) const |
Index | findHalfEdgeIndexFromArc (const Arc &arc) const |
Index | halfEdgeIndexFromVertexIndex (const VertexIndex vi) const |
Index | halfEdgeIndexFromFaceIndex (const FaceIndex fi) const |
Index | halfEdgeIndexFromEdgeIndex (const EdgeIndex ei) const |
void | getNeighboringVertices (const VertexIndex vi, VertexIndexRange &result) const |
VertexIndexRange | neighboringVertices (const VertexIndex vi) const |
Size | nbNeighboringVertices (const Index vi) const |
void | getNeighboringFaces (const VertexIndex vi, FaceIndexRange &result) const |
FaceIndexRange | neighboringFaces (const VertexIndex vi) const |
bool | isVertexBoundary (const VertexIndex vi) const |
VertexIndexRange | boundaryVertices () const |
std::vector< Index > | boundaryHalfEdgeIndices () const |
std::vector< Arc > | boundaryArcs () const |
Size | nbSides (Index hei) const |
Size | nbSidesOfFace (const FaceIndex f) const |
VertexIndexRange | verticesOfFace (const FaceIndex f) const |
bool | isFlippable (const Index hei) const |
void | flip (const Index hei, bool update_arc2index=true) |
VertexIndex | split (const Index i, bool update_arc2index=true) |
bool | isMergeable (const Index hei) const |
VertexIndex | merge (const Index hei, bool update_arc2index=true) |
bool | isValid (bool check_arc2index=true) const |
bool | isValidTriangulation () const |
void | selfDisplay (std::ostream &out) const |
Static Public Member Functions | |
static Size | getUnorderedEdgesFromTriangles (const std::vector< Triangle > &triangles, std::vector< Edge > &edges_out) |
static Size | getUnorderedEdgesFromPolygonalFaces (const std::vector< PolygonalFace > &polygonal_faces, std::vector< Edge > &edges_out) |
Protected Member Functions | |
void | renumberVertex (const VertexIndex vi, bool update_arc2index=true) |
void | renumberEdge (const EdgeIndex ei) |
void | renumberFace (const FaceIndex fi) |
void | renumberHalfEdge (const Index i, bool update_arc2index=true) |
Static Protected Member Functions | |
static FaceIndex | arc2FaceIndex (const Arc2FaceIndex &de2fi, VertexIndex vi, VertexIndex vj) |
Protected Attributes | |
std::vector< HalfEdge > | myHalfEdges |
Stores all the half-edges. | |
std::vector< Index > | myVertexHalfEdges |
std::vector< Index > | myFaceHalfEdges |
std::vector< Index > | myEdgeHalfEdges |
Arc2Index | myArc2Index |
The mapping between arcs to their half-edge index. | |
Aim: This class represents an half-edge data structure, which is a structure for representing the topology of a combinatorial 2-dimensional surface or an embedding of a planar graph in the plane. It does not store any geometry. As a minimal example, these lines of code build two triangles connected by the edge {1,2}.
Description of template class 'HalfEdgeDataStructure'
Definition at line 82 of file HalfEdgeDataStructure.h.
std::pair<VertexIndex, VertexIndex> DGtal::HalfEdgeDataStructure::Arc |
An arc is a directed edge from a first vertex to a second vertex.
Definition at line 116 of file HalfEdgeDataStructure.h.
std::map< Arc, FaceIndex > DGtal::HalfEdgeDataStructure::Arc2FaceIndex |
Definition at line 122 of file HalfEdgeDataStructure.h.
std::map< Arc, Index > DGtal::HalfEdgeDataStructure::Arc2Index |
Definition at line 119 of file HalfEdgeDataStructure.h.
The type for numbering edges.
Definition at line 95 of file HalfEdgeDataStructure.h.
std::vector<EdgeIndex> DGtal::HalfEdgeDataStructure::EdgeIndexRange |
Definition at line 112 of file HalfEdgeDataStructure.h.
The type for numbering faces.
Definition at line 97 of file HalfEdgeDataStructure.h.
std::vector<FaceIndex> DGtal::HalfEdgeDataStructure::FaceIndexRange |
Definition at line 113 of file HalfEdgeDataStructure.h.
The type used for numbering half-edges (alias)
Definition at line 91 of file HalfEdgeDataStructure.h.
Definition at line 110 of file HalfEdgeDataStructure.h.
std::size_t DGtal::HalfEdgeDataStructure::Index |
The type used for numbering half-edges (an offset an the half-edges structure).
Definition at line 89 of file HalfEdgeDataStructure.h.
std::vector<VertexIndex> DGtal::HalfEdgeDataStructure::PolygonalFace |
Defines an arbitrary polygonal face as a vector of vertex indices. To be valid, its size must be at least 3.
Definition at line 182 of file HalfEdgeDataStructure.h.
std::size_t DGtal::HalfEdgeDataStructure::Size |
The type for counting elements.
Definition at line 87 of file HalfEdgeDataStructure.h.
The type for numbering vertices.
Definition at line 93 of file HalfEdgeDataStructure.h.
Definition at line 111 of file HalfEdgeDataStructure.h.
|
inline |
Default constructor. The data structure is empty.
Definition at line 213 of file HalfEdgeDataStructure.h.
|
inlinestaticprotected |
Definition at line 1413 of file HalfEdgeDataStructure.h.
References DGtal::HALF_EDGE_INVALID_INDEX.
i | any valid half-edge index. |
Definition at line 388 of file HalfEdgeDataStructure.h.
References myHalfEdges, DGtal::HalfEdgeDataStructure::HalfEdge::opposite, and DGtal::HalfEdgeDataStructure::HalfEdge::toVertex.
Referenced by boundaryArcs().
|
inline |
Definition at line 566 of file HalfEdgeDataStructure.h.
References arcFromHalfEdgeIndex(), DGtal::HalfEdgeDataStructure::HalfEdge::face, DGtal::HALF_EDGE_INVALID_INDEX, halfEdge(), and myHalfEdges.
Referenced by SCENARIO().
|
inline |
Definition at line 552 of file HalfEdgeDataStructure.h.
References DGtal::HalfEdgeDataStructure::HalfEdge::face, DGtal::HALF_EDGE_INVALID_INDEX, halfEdge(), and myHalfEdges.
|
inline |
Definition at line 536 of file HalfEdgeDataStructure.h.
References DGtal::HalfEdgeDataStructure::HalfEdge::face, DGtal::HALF_EDGE_INVALID_INDEX, halfEdge(), myHalfEdges, and DGtal::HalfEdgeDataStructure::HalfEdge::toVertex.
Referenced by isValid(), and SCENARIO().
bool DGtal::HalfEdgeDataStructure::build | ( | const Size | num_vertices, |
const std::vector< PolygonalFace > & | polygonal_faces, | ||
const std::vector< Edge > & | edges ) |
Builds the half-edge data structures from the given polygonal faces and edges. It keeps the numbering of vertices given in the input polygonal_faces as well as the numbering of faces in the vector polygonal_faces.
[in] | num_vertices | the number of vertices (one more than the maximal vertex index). |
[in] | polygonal_faces | the vector of input polygonal_faces. |
[in] | edges | the vector of input unoriented edges. |
bool DGtal::HalfEdgeDataStructure::build | ( | const Size | num_vertices, |
const std::vector< Triangle > & | triangles, | ||
const std::vector< Edge > & | edges ) |
Builds the half-edge data structures from the given triangles and edges. It keeps the numbering of vertices given in the input triangles as well as the numbering of triangles in the vector triangles.
[in] | num_vertices | the number of vertices (one more than the maximal vertex index). |
[in] | triangles | the vector of input triangles. |
[in] | edges | the vector of input unoriented edges. |
Referenced by build(), build(), makeBox(), makeCube(), makeOctahedron(), makePyramid(), makeRibbonWithHole(), makeTetrahedron(), makeThreeTriangles(), makeTriangulatedDisk(), and makeTwoTriangles().
|
inline |
Builds the half-edge data structure from the given polygonal faces. It keeps the numbering of vertices given in the input polygonal_faces as well as the numbering of faces in the vector polygonal_faces.
[in] | polygonal_faces | the vector of input polygonal faces. |
Definition at line 349 of file HalfEdgeDataStructure.h.
References build(), and getUnorderedEdgesFromPolygonalFaces().
|
inline |
Builds the half-edge data structure from the given triangles. It keeps the numbering of vertices given in the input triangles as well as the numbering of triangles in the vector triangles.
[in] | triangles | the vector of input triangles. |
Definition at line 334 of file HalfEdgeDataStructure.h.
References build(), and getUnorderedEdgesFromTriangles().
|
inline |
Clears the data structure.
Definition at line 357 of file HalfEdgeDataStructure.h.
References myArc2Index, myEdgeHalfEdges, myFaceHalfEdges, myHalfEdges, and myVertexHalfEdges.
|
inline |
Definition at line 379 of file HalfEdgeDataStructure.h.
References nbEdges(), nbFaces(), and nbVertices().
Referenced by DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer >::Euler(), DGtal::PolygonalSurface< TPoint >::Euler(), and DGtal::TriangulatedSurface< TPoint >::Euler().
arc | any directed edge (i,j) |
Definition at line 430 of file HalfEdgeDataStructure.h.
References DGtal::HALF_EDGE_INVALID_INDEX, halfEdge(), halfEdgeIndexFromVertexIndex(), myHalfEdges, DGtal::HalfEdgeDataStructure::HalfEdge::next, DGtal::HalfEdgeDataStructure::HalfEdge::opposite, and DGtal::HalfEdgeDataStructure::HalfEdge::toVertex.
|
inline |
i | the vertex index of some vertex. |
j | the vertex index of some other vertex. |
Definition at line 418 of file HalfEdgeDataStructure.h.
References findHalfEdgeIndexFromArc().
Referenced by findHalfEdgeIndexFromArc(), isValid(), SCENARIO(), SCENARIO(), and SCENARIO().
|
inline |
Tries to flip the edge containing hei.
hei | any valid half-edge index. |
update_arc2index | (optimisation parameter), when 'true' updates everything consistently; when 'false' do not update myArc2Index map, which means you cannot get an half edge from two vertices afterwards. Use 'false' only if you know that you never use this mapping (e.g. no call to halfEdgeIndexFromArc) |
isFlippable( hei ) == true
Definition at line 664 of file HalfEdgeDataStructure.h.
References DGtal::HalfEdgeDataStructure::HalfEdge::face, myArc2Index, myFaceHalfEdges, myHalfEdges, myVertexHalfEdges, DGtal::HalfEdgeDataStructure::HalfEdge::next, DGtal::HalfEdgeDataStructure::HalfEdge::opposite, and DGtal::HalfEdgeDataStructure::HalfEdge::toVertex.
Referenced by SCENARIO().
|
inline |
[in] | vi | any vertex index. |
[out] | result | the sequence of neighboring faces of the given vertex vi . |
Definition at line 501 of file HalfEdgeDataStructure.h.
References DGtal::HalfEdgeDataStructure::HalfEdge::face, DGtal::HALF_EDGE_INVALID_INDEX, halfEdge(), halfEdgeIndexFromVertexIndex(), DGtal::HalfEdgeDataStructure::HalfEdge::next, and DGtal::HalfEdgeDataStructure::HalfEdge::opposite.
Referenced by neighboringFaces().
|
inline |
[in] | vi | any vertex index. |
[out] | result | the sequence of vertex neighbors of the given vertex vi (clockwise if triangles were given ccw). |
Definition at line 459 of file HalfEdgeDataStructure.h.
References halfEdge(), halfEdgeIndexFromVertexIndex(), DGtal::HalfEdgeDataStructure::HalfEdge::next, DGtal::HalfEdgeDataStructure::HalfEdge::opposite, and DGtal::HalfEdgeDataStructure::HalfEdge::toVertex.
Referenced by neighboringVertices(), and SCENARIO().
|
static |
Computes all the unoriented edges of the given polygonal faces.
[in] | polygonal_faces | the vector of input oriented polygonal faces. |
[out] | edges_out | the vector of all the unoriented edges of the given triangles. |
Referenced by build().
|
inlinestatic |
Computes all the unoriented edges of the given triangles.
[in] | triangles | the vector of input oriented triangles. |
[out] | edges_out | the vector of all the unoriented edges of the given triangles. |
Definition at line 230 of file HalfEdgeDataStructure.h.
Referenced by build(), makeRibbonWithHole(), and makeTriangulatedDisk().
i | any valid half-edge index. |
Definition at line 384 of file HalfEdgeDataStructure.h.
References myHalfEdges.
Referenced by boundaryArcs(), boundaryHalfEdgeIndices(), boundaryVertices(), findHalfEdgeIndexFromArc(), getNeighboringFaces(), getNeighboringVertices(), isFlippable(), isMergeable(), isValid(), isValidTriangulation(), isVertexBoundary(), merge(), nbNeighboringVertices(), nbSides(), renumberHalfEdge(), renumberVertex(), and verticesOfFace().
arc | any directed edge (i,j) |
Definition at line 402 of file HalfEdgeDataStructure.h.
References DGtal::HALF_EDGE_INVALID_INDEX, and myArc2Index.
|
inline |
i | the vertex index of some vertex. |
j | the vertex index of some other vertex. |
Definition at line 397 of file HalfEdgeDataStructure.h.
References halfEdgeIndexFromArc().
Referenced by halfEdgeIndexFromArc(), and SCENARIO().
[in] | ei | any edge index. |
Definition at line 454 of file HalfEdgeDataStructure.h.
References myEdgeHalfEdges.
Referenced by SCENARIO().
[in] | fi | any face index. |
Definition at line 449 of file HalfEdgeDataStructure.h.
References myFaceHalfEdges.
Referenced by nbSidesOfFace(), and verticesOfFace().
|
inline |
[in] | vi | any vertex index. |
Definition at line 444 of file HalfEdgeDataStructure.h.
References myVertexHalfEdges.
Referenced by findHalfEdgeIndexFromArc(), getNeighboringFaces(), getNeighboringVertices(), isValid(), and nbNeighboringVertices().
|
inline |
An edge is (topologically) flippable iff: (1) it does not lie on the boundary, (2) it is bordered by two triangles, (3) the two other vertices of the quad are not already neighbors.
hei | any valid half-edge index. |
Definition at line 628 of file HalfEdgeDataStructure.h.
References DGtal::HalfEdgeDataStructure::HalfEdge::face, DGtal::HALF_EDGE_INVALID_INDEX, halfEdge(), nbSides(), neighboringVertices(), DGtal::HalfEdgeDataStructure::HalfEdge::next, DGtal::HalfEdgeDataStructure::HalfEdge::opposite, and DGtal::HalfEdgeDataStructure::HalfEdge::toVertex.
Referenced by SCENARIO(), and SCENARIO().
|
inline |
An edge is (topologically) mergeable iff: (1) it is bordered by two triangles, (2) there is no boundary vertex in the two triangles bordering the edge.
hei | any valid half-edge index. |
Definition at line 827 of file HalfEdgeDataStructure.h.
References DGtal::HalfEdgeDataStructure::HalfEdge::face, DGtal::HALF_EDGE_INVALID_INDEX, halfEdge(), isVertexBoundary(), nbSides(), DGtal::HalfEdgeDataStructure::HalfEdge::next, DGtal::HalfEdgeDataStructure::HalfEdge::opposite, and DGtal::HalfEdgeDataStructure::HalfEdge::toVertex.
Referenced by SCENARIO().
|
inline |
Checks the whole half-edge structure for consistency. Complexity is at O(n log n) if n in the number of half-edges.
check_arc2index | (optimisation parameter), when 'true' checks everything, otherwise does not check that the mapping myArc2Index is correct. This is used in conjunction with flip method when using the optimisation. |
Definition at line 1109 of file HalfEdgeDataStructure.h.
References boundaryVertices(), DGtal::HalfEdgeDataStructure::HalfEdge::edge, DGtal::HalfEdgeDataStructure::HalfEdge::face, findHalfEdgeIndexFromArc(), DGtal::HALF_EDGE_INVALID_INDEX, halfEdge(), halfEdgeIndexFromVertexIndex(), myArc2Index, myEdgeHalfEdges, myFaceHalfEdges, myHalfEdges, myVertexHalfEdges, nbEdges(), nbFaces(), nbHalfEdges(), nbVertices(), DGtal::HalfEdgeDataStructure::HalfEdge::next, DGtal::HalfEdgeDataStructure::HalfEdge::opposite, DGtal::HalfEdgeDataStructure::HalfEdge::toVertex, DGtal::trace, and DGtal::Trace::warning().
Referenced by SCENARIO(), SCENARIO(), SCENARIO(), and SCENARIO().
|
inline |
Specific checks that are meaningful only for a triangulation (i.e. faces have three vertices).
Definition at line 1322 of file HalfEdgeDataStructure.h.
References DGtal::HalfEdgeDataStructure::HalfEdge::edge, DGtal::HalfEdgeDataStructure::HalfEdge::face, halfEdge(), myFaceHalfEdges, nbFaces(), DGtal::HalfEdgeDataStructure::HalfEdge::next, DGtal::HalfEdgeDataStructure::HalfEdge::toVertex, DGtal::trace, and DGtal::Trace::warning().
Referenced by SCENARIO(), SCENARIO(), SCENARIO(), and SCENARIO().
|
inline |
[in] | vi | any vertex index. |
Definition at line 526 of file HalfEdgeDataStructure.h.
References DGtal::HalfEdgeDataStructure::HalfEdge::face, DGtal::HALF_EDGE_INVALID_INDEX, halfEdge(), and myVertexHalfEdges.
Referenced by isMergeable().
|
inline |
Merges the edge specified by the half-edge hei.
hei | any valid half-edge index. |
update_arc2index | (optimisation parameter), when 'true' updates everything consistently; when 'false' do not update myArc2Index map, which means you cannot get an half edge from two vertices afterwards. Use 'false' only if you know that you never use this mapping (e.g. no call to halfEdgeIndexFromArc) |
isMergeable( hei ) == true
Definition at line 865 of file HalfEdgeDataStructure.h.
References DGtal::HalfEdgeDataStructure::HalfEdge::edge, DGtal::HalfEdgeDataStructure::HalfEdge::face, halfEdge(), myArc2Index, myEdgeHalfEdges, myHalfEdges, myVertexHalfEdges, nbNeighboringVertices(), DGtal::HalfEdgeDataStructure::HalfEdge::next, DGtal::HalfEdgeDataStructure::HalfEdge::opposite, renumberEdge(), renumberFace(), renumberHalfEdge(), renumberVertex(), DGtal::HalfEdgeDataStructure::HalfEdge::toVertex, DGtal::trace, and DGtal::Trace::warning().
Referenced by SCENARIO().
|
inline |
Definition at line 373 of file HalfEdgeDataStructure.h.
References myEdgeHalfEdges.
Referenced by Euler(), isValid(), DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer >::nbEdges(), DGtal::PolygonalSurface< TPoint >::nbEdges(), DGtal::TriangulatedSurface< TPoint >::nbEdges(), renumberEdge(), SCENARIO(), SCENARIO(), SCENARIO(), and SCENARIO().
|
inline |
Definition at line 376 of file HalfEdgeDataStructure.h.
References myFaceHalfEdges.
Referenced by Euler(), isValid(), isValidTriangulation(), DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer >::nbFaces(), DGtal::PolygonalSurface< TPoint >::nbFaces(), DGtal::TriangulatedSurface< TPoint >::nbFaces(), renumberFace(), SCENARIO(), SCENARIO(), and SCENARIO().
|
inline |
Definition at line 367 of file HalfEdgeDataStructure.h.
References myHalfEdges.
Referenced by isValid(), DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer >::nbArcs(), DGtal::PolygonalSurface< TPoint >::nbArcs(), DGtal::TriangulatedSurface< TPoint >::nbArcs(), renumberHalfEdge(), and SCENARIO().
[in] | vi | any vertex index. |
Definition at line 484 of file HalfEdgeDataStructure.h.
References halfEdge(), halfEdgeIndexFromVertexIndex(), DGtal::HalfEdgeDataStructure::HalfEdge::next, and DGtal::HalfEdgeDataStructure::HalfEdge::opposite.
Referenced by merge().
hei | any valid half-edge index. |
Definition at line 580 of file HalfEdgeDataStructure.h.
References DGtal::HALF_EDGE_INVALID_INDEX, halfEdge(), and DGtal::HalfEdgeDataStructure::HalfEdge::next.
Referenced by isFlippable(), isMergeable(), and nbSidesOfFace().
f | any valid face index. |
Definition at line 595 of file HalfEdgeDataStructure.h.
References halfEdgeIndexFromFaceIndex(), and nbSides().
|
inline |
Definition at line 370 of file HalfEdgeDataStructure.h.
References myVertexHalfEdges.
Referenced by Euler(), isValid(), DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer >::nbVertices(), DGtal::PolygonalSurface< TPoint >::nbVertices(), DGtal::TriangulatedSurface< TPoint >::nbVertices(), renumberVertex(), SCENARIO(), SCENARIO(), and SCENARIO().
|
inline |
[in] | vi | any vertex index. |
Definition at line 517 of file HalfEdgeDataStructure.h.
References getNeighboringFaces().
|
inline |
[in] | vi | any vertex index. |
Definition at line 475 of file HalfEdgeDataStructure.h.
References getNeighboringVertices().
Referenced by isFlippable(), SCENARIO(), SCENARIO(), and SCENARIO().
|
inlineprotected |
Renumber the last edge of the triangulated surface as edge ei (this replaces it). The number of edges of the data structure is decreased by 1.
Definition at line 1023 of file HalfEdgeDataStructure.h.
References DGtal::HalfEdgeDataStructure::HalfEdge::edge, myEdgeHalfEdges, myHalfEdges, nbEdges(), and DGtal::HalfEdgeDataStructure::HalfEdge::opposite.
Referenced by merge().
|
inlineprotected |
Renumber the last face of the triangulated surface as face fi (this replaces it). The number of faces of the data structure is decreased by 1.
Definition at line 1042 of file HalfEdgeDataStructure.h.
References DGtal::HalfEdgeDataStructure::HalfEdge::face, myFaceHalfEdges, myHalfEdges, nbFaces(), and DGtal::HalfEdgeDataStructure::HalfEdge::next.
Referenced by merge().
|
inlineprotected |
Renumber the last half-edge of the triangulated surface as half-edge i (this replaces it). The number of half-edges of the data structure is decreased by 1.
Definition at line 1061 of file HalfEdgeDataStructure.h.
References DGtal::HalfEdgeDataStructure::HalfEdge::edge, DGtal::HalfEdgeDataStructure::HalfEdge::face, halfEdge(), myArc2Index, myEdgeHalfEdges, myFaceHalfEdges, myHalfEdges, myVertexHalfEdges, nbHalfEdges(), DGtal::HalfEdgeDataStructure::HalfEdge::next, DGtal::HalfEdgeDataStructure::HalfEdge::opposite, and DGtal::HalfEdgeDataStructure::HalfEdge::toVertex.
Referenced by merge().
|
inlineprotected |
Renumber the last vertex of the triangulated surface as vertex i (this replaces it). The number of vertices of the data structure is decreased by 1.
Definition at line 994 of file HalfEdgeDataStructure.h.
References halfEdge(), myArc2Index, myHalfEdges, myVertexHalfEdges, nbVertices(), DGtal::HalfEdgeDataStructure::HalfEdge::next, DGtal::HalfEdgeDataStructure::HalfEdge::opposite, and DGtal::HalfEdgeDataStructure::HalfEdge::toVertex.
Referenced by merge().
void DGtal::HalfEdgeDataStructure::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
|
inline |
Splits the edge specified by the half-edge i.
i | any valid half-edge index. |
update_arc2index | (optimisation parameter), when 'true' updates everything consistently; when 'false' do not update myArc2Index map, which means you cannot get an half edge from two vertices afterwards. Use 'false' only if you know that you never use this mapping (e.g. no call to halfEdgeIndexFromArc) |
isFlippable( i ) == true
Definition at line 727 of file HalfEdgeDataStructure.h.
References DGtal::HalfEdgeDataStructure::HalfEdge::edge, DGtal::HalfEdgeDataStructure::HalfEdge::face, myArc2Index, myEdgeHalfEdges, myFaceHalfEdges, myHalfEdges, myVertexHalfEdges, DGtal::HalfEdgeDataStructure::HalfEdge::next, DGtal::HalfEdgeDataStructure::HalfEdge::opposite, and DGtal::HalfEdgeDataStructure::HalfEdge::toVertex.
Referenced by SCENARIO().
|
inline |
f | any valid face index. |
Definition at line 602 of file HalfEdgeDataStructure.h.
References halfEdge(), halfEdgeIndexFromFaceIndex(), DGtal::HalfEdgeDataStructure::HalfEdge::next, and DGtal::HalfEdgeDataStructure::HalfEdge::toVertex.
|
protected |
The mapping between arcs to their half-edge index.
Definition at line 1393 of file HalfEdgeDataStructure.h.
Referenced by clear(), flip(), halfEdgeIndexFromArc(), isValid(), merge(), renumberHalfEdge(), renumberVertex(), and split().
|
protected |
Offset into the 'halfedges' sequence, one per edge (unordered pair of vertex indices). Associates to each edge index the index of an half-edge on this edge.
Definition at line 1391 of file HalfEdgeDataStructure.h.
Referenced by clear(), halfEdgeIndexFromEdgeIndex(), isValid(), merge(), nbEdges(), renumberEdge(), renumberHalfEdge(), and split().
|
protected |
Offset into the 'halfedges' sequence, one per face. Associates to each face index the index of an half-edge lying on the border of this face.
Definition at line 1387 of file HalfEdgeDataStructure.h.
Referenced by clear(), flip(), halfEdgeIndexFromFaceIndex(), isValid(), isValidTriangulation(), nbFaces(), renumberFace(), renumberHalfEdge(), and split().
|
protected |
Stores all the half-edges.
Definition at line 1379 of file HalfEdgeDataStructure.h.
Referenced by arcFromHalfEdgeIndex(), boundaryArcs(), boundaryHalfEdgeIndices(), boundaryVertices(), clear(), findHalfEdgeIndexFromArc(), flip(), halfEdge(), isValid(), merge(), nbHalfEdges(), renumberEdge(), renumberFace(), renumberHalfEdge(), renumberVertex(), and split().
|
protected |
Offsets into the 'halfedges' sequence, one per vertex. Associates to each vertex index the index of an half-edge originating from this vertex.
Definition at line 1383 of file HalfEdgeDataStructure.h.
Referenced by clear(), flip(), halfEdgeIndexFromVertexIndex(), isValid(), isVertexBoundary(), merge(), nbVertices(), renumberHalfEdge(), renumberVertex(), and split().