DGtal  0.9.4.1
Data Structures | Public Types | Public Member Functions | Protected Types | Protected Attributes
DGtal::TriangulatedSurface< TPoint > Class Template Reference

#include <DGtal/shapes/TriangulatedSurface.h>

Collaboration diagram for DGtal::TriangulatedSurface< TPoint >:
[legend]

Data Structures

struct  IndexedPropertyMap
 
struct  VertexMap
 

Public Types

typedef TPoint Point
 
typedef TriangulatedSurface< TPoint > Self
 
typedef HalfEdgeDataStructure::Size Size
 
typedef HalfEdgeDataStructure::Index Index
 
typedef HalfEdgeDataStructure::VertexIndex VertexIndex
 
typedef HalfEdgeDataStructure::EdgeIndex EdgeIndex
 
typedef HalfEdgeDataStructure::FaceIndex FaceIndex
 
typedef HalfEdgeDataStructure::Triangle Triangle
 
typedef std::vector< PointPositionsStorage
 
typedef std::vector< TriangleTriangleStorage
 
typedef VertexIndex Vertex
 
typedef std::set< VertexVertexSet
 
typedef EdgeIndex Edge
 
typedef IntegerSequenceIterator< VertexIndexConstIterator
 
typedef HalfEdgeDataStructure::HalfEdgeIndex Arc
 
typedef HalfEdgeDataStructure::FaceIndex Face
 
typedef std::vector< ArcArcRange
 
typedef std::vector< FaceFaceRange
 
typedef std::vector< VertexVertexRange
 
typedef IndexedPropertyMap< PointPositionsMap
 

Public Member Functions

 BOOST_STATIC_CONSTANT (Face, INVALID_FACE=HALF_EDGE_INVALID_INDEX)
 
 ~TriangulatedSurface ()
 
 TriangulatedSurface ()
 
void clear ()
 
bool build ()
 
VertexIndex addVertex (const Point &vdata)
 
FaceIndex addTriangle (VertexIndex v0, VertexIndex v1, VertexIndex v2)
 
Size nbArcs () const
 
Size nbVertices () const
 
Size nbEdges () const
 
Size nbFaces () const
 
long Euler () const
 
PositionsMap positions ()
 
template<typename AnyData >
IndexedPropertyMap< AnyData > makeVertexMap () const
 
template<typename AnyData >
IndexedPropertyMap< AnyData > makeVertexMap (AnyData value) const
 
template<typename AnyData >
IndexedPropertyMap< AnyData > makeEdgeMap () const
 
template<typename AnyData >
IndexedPropertyMap< AnyData > makeEdgeMap (AnyData value) const
 
template<typename AnyData >
IndexedPropertyMap< AnyData > makeFaceMap () const
 
template<typename AnyData >
IndexedPropertyMap< AnyData > makeFaceMap (AnyData value) const
 
Pointposition (Vertex v)
 
const Pointposition (Vertex v) const
 
Size size () const
 
Size bestCapacity () const
 
Size degree (const Vertex &v) const
 
template<typename OutputIterator >
void writeNeighbors (OutputIterator &it, const Vertex &v) const
 
template<typename OutputIterator , typename VertexPredicate >
void writeNeighbors (OutputIterator &it, const Vertex &v, const VertexPredicate &pred) const
 
ConstIterator begin () const
 
ConstIterator end () const
 
ArcRange outArcs (const Vertex &v) const
 
ArcRange inArcs (const Vertex &v) const
 
FaceRange facesAroundVertex (const Vertex &v) const
 
Vertex head (const Arc &a) const
 
Vertex tail (const Arc &a) const
 
Arc opposite (const Arc &a) const
 
Arc next (const Arc &a) const
 
Arc arc (const Vertex &t, const Vertex &h) const
 
Face faceAroundArc (const Arc &a) const
 
FaceRange facesAroundArc (const Arc &a) const
 
VertexRange verticesAroundFace (const Face &f) const
 
bool isVertexBoundary (const Vertex &v) const
 
bool isArcBoundary (const Arc &v) const
 
FaceRange allFaces () const
 
ArcRange allArcs () const
 
VertexRange allVertices () const
 
ArcRange allBoundaryArcs () const
 
VertexRange allBoundaryVertices () const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Protected Types

typedef HalfEdgeDataStructure::HalfEdge HalfEdge
 

Protected Attributes

bool isHEDSValid
 
HalfEdgeDataStructure myHEDS
 
PositionsStorage myPositions
 
TriangleStorage myTriangles
 

Detailed Description

template<typename TPoint>
class DGtal::TriangulatedSurface< TPoint >

Aim: Represents a triangulated surface. The topology is stored with a half-edge data structure. This object stored the positions of vertices in space. If you need further data attached to the surface, you may use property maps (see TriangulatedSurface::makeVertexMap).

Description of template class 'TriangulatedSurface'

For now, the user must add vertices and triangles, and when finished, call 'build()'.

Model of CUndirectedSimpleGraph: the vertices and edges of the triangulated surface form indeed a graph structure.

Note
Vertices, Arcs, and Faces are all integer ranging from 0 to one less than the total number of the respective elements. You may thus iterate on them by just looping on integers. The index INVALID_FACE is an invalid element (equal to HALF_EDGE_INVALID_INDEX).
Template Parameters
TPointa type defining the position in space of vertices.
See also
HalfEdgeDataStructure
Examples:
shapes/viewMarchingCubes.cpp.

Definition at line 81 of file TriangulatedSurface.h.

Member Typedef Documentation

◆ Arc

template<typename TPoint>
typedef HalfEdgeDataStructure::HalfEdgeIndex DGtal::TriangulatedSurface< TPoint >::Arc

Definition at line 107 of file TriangulatedSurface.h.

◆ ArcRange

template<typename TPoint>
typedef std::vector<Arc> DGtal::TriangulatedSurface< TPoint >::ArcRange

Definition at line 109 of file TriangulatedSurface.h.

◆ ConstIterator

template<typename TPoint>
typedef IntegerSequenceIterator< VertexIndex > DGtal::TriangulatedSurface< TPoint >::ConstIterator

Definition at line 104 of file TriangulatedSurface.h.

◆ Edge

template<typename TPoint>
typedef EdgeIndex DGtal::TriangulatedSurface< TPoint >::Edge

Definition at line 103 of file TriangulatedSurface.h.

◆ EdgeIndex

template<typename TPoint>
typedef HalfEdgeDataStructure::EdgeIndex DGtal::TriangulatedSurface< TPoint >::EdgeIndex

Definition at line 89 of file TriangulatedSurface.h.

◆ Face

template<typename TPoint>
typedef HalfEdgeDataStructure::FaceIndex DGtal::TriangulatedSurface< TPoint >::Face

Definition at line 108 of file TriangulatedSurface.h.

◆ FaceIndex

template<typename TPoint>
typedef HalfEdgeDataStructure::FaceIndex DGtal::TriangulatedSurface< TPoint >::FaceIndex

Definition at line 90 of file TriangulatedSurface.h.

◆ FaceRange

template<typename TPoint>
typedef std::vector<Face> DGtal::TriangulatedSurface< TPoint >::FaceRange

Definition at line 110 of file TriangulatedSurface.h.

◆ HalfEdge

template<typename TPoint>
typedef HalfEdgeDataStructure::HalfEdge DGtal::TriangulatedSurface< TPoint >::HalfEdge
protected

Definition at line 210 of file TriangulatedSurface.h.

◆ Index

template<typename TPoint>
typedef HalfEdgeDataStructure::Index DGtal::TriangulatedSurface< TPoint >::Index

Definition at line 87 of file TriangulatedSurface.h.

◆ Point

template<typename TPoint>
typedef TPoint DGtal::TriangulatedSurface< TPoint >::Point

Definition at line 84 of file TriangulatedSurface.h.

◆ PositionsMap

template<typename TPoint>
typedef IndexedPropertyMap< Point > DGtal::TriangulatedSurface< TPoint >::PositionsMap

Definition at line 207 of file TriangulatedSurface.h.

◆ PositionsStorage

template<typename TPoint>
typedef std::vector<Point> DGtal::TriangulatedSurface< TPoint >::PositionsStorage

Definition at line 92 of file TriangulatedSurface.h.

◆ Self

template<typename TPoint>
typedef TriangulatedSurface<TPoint> DGtal::TriangulatedSurface< TPoint >::Self

Definition at line 85 of file TriangulatedSurface.h.

◆ Size

template<typename TPoint>
typedef HalfEdgeDataStructure::Size DGtal::TriangulatedSurface< TPoint >::Size

Definition at line 86 of file TriangulatedSurface.h.

◆ Triangle

template<typename TPoint>
typedef HalfEdgeDataStructure::Triangle DGtal::TriangulatedSurface< TPoint >::Triangle

Definition at line 91 of file TriangulatedSurface.h.

◆ TriangleStorage

template<typename TPoint>
typedef std::vector<Triangle> DGtal::TriangulatedSurface< TPoint >::TriangleStorage

Definition at line 93 of file TriangulatedSurface.h.

◆ Vertex

template<typename TPoint>
typedef VertexIndex DGtal::TriangulatedSurface< TPoint >::Vertex

Definition at line 96 of file TriangulatedSurface.h.

◆ VertexIndex

template<typename TPoint>
typedef HalfEdgeDataStructure::VertexIndex DGtal::TriangulatedSurface< TPoint >::VertexIndex

Definition at line 88 of file TriangulatedSurface.h.

◆ VertexRange

template<typename TPoint>
typedef std::vector<Vertex> DGtal::TriangulatedSurface< TPoint >::VertexRange

Definition at line 111 of file TriangulatedSurface.h.

◆ VertexSet

template<typename TPoint>
typedef std::set<Vertex> DGtal::TriangulatedSurface< TPoint >::VertexSet

Definition at line 97 of file TriangulatedSurface.h.

Constructor & Destructor Documentation

◆ ~TriangulatedSurface()

template<typename TPoint>
DGtal::TriangulatedSurface< TPoint >::~TriangulatedSurface ( )
inline

Destructor.

Definition at line 218 of file TriangulatedSurface.h.

218 {}

◆ TriangulatedSurface()

template<typename TPoint>
DGtal::TriangulatedSurface< TPoint >::TriangulatedSurface ( )
inline

Constructor.

Definition at line 223 of file TriangulatedSurface.h.

223 : isHEDSValid( false ) {}
bool isHEDSValid
Indicates if the half-edge structure has been created/updated.

Member Function Documentation

◆ addTriangle()

template<typename TPoint>
FaceIndex DGtal::TriangulatedSurface< TPoint >::addTriangle ( VertexIndex  v0,
VertexIndex  v1,
VertexIndex  v2 
)

Adds a new triangle of vertices v0, v1, v2 to the surface.

Returns
the corresponding index of the triangle.

Referenced by makeTwoTriangles().

◆ addVertex()

template<typename TPoint>
VertexIndex DGtal::TriangulatedSurface< TPoint >::addVertex ( const Point vdata)

Adds a new vertex to the surface with data vdata.

Parameters
vdatathe data associated to this new vertex.
Returns
the new index given to this vertex.

Referenced by makeTwoTriangles().

◆ allArcs()

template<typename TPoint>
ArcRange DGtal::TriangulatedSurface< TPoint >::allArcs ( ) const
Returns
the range of all arcs of the triangulated surface, i.e. an array containing 0, 1, 2, ..., nbArcs()-1.

◆ allBoundaryArcs()

template<typename TPoint>
ArcRange DGtal::TriangulatedSurface< TPoint >::allBoundaryArcs ( ) const

This set of arcs is sufficient for displaying the boundary of the surface.

Returns
the array of all arcs (oriented edges) lying on the boundary of the surface (in no particular order).

Referenced by SCENARIO().

◆ allBoundaryVertices()

template<typename TPoint>
VertexRange DGtal::TriangulatedSurface< TPoint >::allBoundaryVertices ( ) const

This set of arcs is sufficient for displaying the boundary of the surface.

Returns
the array of vertices lying on the boundary of the surface (in no particular order).

Referenced by SCENARIO().

◆ allFaces()

template<typename TPoint>
FaceRange DGtal::TriangulatedSurface< TPoint >::allFaces ( ) const
Returns
the range of all faces of the triangulated surface, i.e. an array containing 0, 1, 2, ..., nbVertices()-1.

◆ allVertices()

template<typename TPoint>
VertexRange DGtal::TriangulatedSurface< TPoint >::allVertices ( ) const
Returns
the range of all vertices of the triangulated surface, i.e. an array containing 0, 1, 2, ..., nbVertices()-1.

◆ arc()

template<typename TPoint>
Arc DGtal::TriangulatedSurface< TPoint >::arc ( const Vertex t,
const Vertex h 
) const

[t] and [h] should be adjacent vertices.

Parameters
tthe vertex at the tail of the arc.
hthe vertex at the head of the arc.
Returns
the arc (tail, head)

Referenced by SCENARIO().

◆ begin()

template<typename TPoint>
ConstIterator DGtal::TriangulatedSurface< TPoint >::begin ( ) const
inline
Returns
a (non mutable) iterator pointing on the first vertex.

Definition at line 386 of file TriangulatedSurface.h.

Referenced by SCENARIO().

387  { return ConstIterator( 0 ); }
IntegerSequenceIterator< VertexIndex > ConstIterator

◆ bestCapacity()

template<typename TPoint>
Size DGtal::TriangulatedSurface< TPoint >::bestCapacity ( ) const
Returns
an estimate of the maximum number of neighbors for this adjacency
Note
chosen here to be 8. Number of neighbors is 6 on average for planar triangulations.

◆ BOOST_STATIC_CONSTANT()

template<typename TPoint>
DGtal::TriangulatedSurface< TPoint >::BOOST_STATIC_CONSTANT ( Face  ,
INVALID_FACE  = HALF_EDGE_INVALID_INDEX 
)

◆ build()

template<typename TPoint>
bool DGtal::TriangulatedSurface< TPoint >::build ( )

Builds the half-edge data structure from the given triangles and vertices. After that, the surface is valid.

Returns
true if everything went allright, false if it was not possible to build a consistent data structure (e.g., butterfly neighborhoods).

Referenced by makeTwoTriangles().

◆ clear()

template<typename TPoint>
void DGtal::TriangulatedSurface< TPoint >::clear ( )

Clears everything.

◆ degree()

template<typename TPoint>
Size DGtal::TriangulatedSurface< TPoint >::degree ( const Vertex v) const
Parameters
vany vertex
Returns
the number of neighbors of this vertex

Referenced by SCENARIO().

◆ end()

template<typename TPoint>
ConstIterator DGtal::TriangulatedSurface< TPoint >::end ( ) const
inline
Returns
a (non mutable) iterator pointing after the last vertex.

Definition at line 390 of file TriangulatedSurface.h.

References DGtal::TriangulatedSurface< TPoint >::nbVertices().

Referenced by SCENARIO().

391  { return ConstIterator( nbVertices() ); }
IntegerSequenceIterator< VertexIndex > ConstIterator

◆ Euler()

template<typename TPoint>
long DGtal::TriangulatedSurface< TPoint >::Euler ( ) const
inline
Returns
the euler characteristic of the triangulated surface (a famous topological invariant that is the number of vertices minus the number of edges plus the number of faces).

Definition at line 262 of file TriangulatedSurface.h.

References DGtal::HalfEdgeDataStructure::Euler(), and DGtal::TriangulatedSurface< TPoint >::myHEDS.

Referenced by SCENARIO().

262 { return myHEDS.Euler(); }
HalfEdgeDataStructure myHEDS
The half-edge data structure that stores the topology of the mesh.

◆ faceAroundArc()

template<typename TPoint>
Face DGtal::TriangulatedSurface< TPoint >::faceAroundArc ( const Arc a) const

Convenience method for computing the face incident to a given arc. There is at most one face that borders an arc for triangulated surface since it is a combinatorial 2-manifold.

Parameters
aany arc on the surface.
Returns
the face around the given arc or the InvalidFace if the arc was a boundary arc.

Referenced by SCENARIO().

◆ facesAroundArc()

template<typename TPoint>
FaceRange DGtal::TriangulatedSurface< TPoint >::facesAroundArc ( const Arc a) const

Computes the faces incident to a given arc. There is only one for triangulated surface since it is a combinatorial 2-manifold.

Parameters
aany arc on the surface.
Returns
a vector containing the faces incident to this arc.

◆ facesAroundVertex()

template<typename TPoint>
FaceRange DGtal::TriangulatedSurface< TPoint >::facesAroundVertex ( const Vertex v) const
Parameters
vany vertex of the surface.
Returns
the faces containing this vertex [v].

◆ head()

template<typename TPoint>
Vertex DGtal::TriangulatedSurface< TPoint >::head ( const Arc a) const
Parameters
aany arc (s,t)
Returns
the vertex t

◆ inArcs()

template<typename TPoint>
ArcRange DGtal::TriangulatedSurface< TPoint >::inArcs ( const Vertex v) const
Parameters
vany vertex of the surface.
Returns
the ingoing arcs to [v]

◆ isArcBoundary()

template<typename TPoint>
bool DGtal::TriangulatedSurface< TPoint >::isArcBoundary ( const Arc v) const
Parameters
vany arc.
Returns
'true' if and only if arc v lies on a boundary (note that the opposite arc does not lie on the boundary).
Note
O(1) operation

◆ isValid()

template<typename TPoint>
bool DGtal::TriangulatedSurface< TPoint >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.

◆ isVertexBoundary()

template<typename TPoint>
bool DGtal::TriangulatedSurface< TPoint >::isVertexBoundary ( const Vertex v) const
Parameters
vany vertex.
Returns
'true' if and only if vertex v lies on a boundary.
Note
O(1) operation

◆ makeEdgeMap() [1/2]

template<typename TPoint>
template<typename AnyData >
IndexedPropertyMap< AnyData > DGtal::TriangulatedSurface< TPoint >::makeEdgeMap ( ) const
inline
Returns
an edge property map that associates some data to any edge.

Definition at line 288 of file TriangulatedSurface.h.

References DGtal::TriangulatedSurface< TPoint >::nbEdges().

289  {
290  return IndexedPropertyMap< AnyData >( *this, nbEdges() );
291  }

◆ makeEdgeMap() [2/2]

template<typename TPoint>
template<typename AnyData >
IndexedPropertyMap< AnyData > DGtal::TriangulatedSurface< TPoint >::makeEdgeMap ( AnyData  value) const
inline
Parameters
valuethe value that is given to all edges at initialization.
Returns
an edge property map that associates some data to any edge.

Definition at line 296 of file TriangulatedSurface.h.

References DGtal::TriangulatedSurface< TPoint >::nbEdges().

297  {
298  return IndexedPropertyMap< AnyData >( *this, nbEdges(), value );
299  }

◆ makeFaceMap() [1/2]

template<typename TPoint>
template<typename AnyData >
IndexedPropertyMap< AnyData > DGtal::TriangulatedSurface< TPoint >::makeFaceMap ( ) const
inline
Returns
a face property map that associates some data to any face.

Definition at line 303 of file TriangulatedSurface.h.

References DGtal::TriangulatedSurface< TPoint >::nbFaces().

304  {
305  return IndexedPropertyMap< AnyData >( *this, nbFaces() );
306  }

◆ makeFaceMap() [2/2]

template<typename TPoint>
template<typename AnyData >
IndexedPropertyMap< AnyData > DGtal::TriangulatedSurface< TPoint >::makeFaceMap ( AnyData  value) const
inline
Parameters
valuethe value that is given to all faces at initialization.
Returns
a face property map that associates some data to any face.

Definition at line 311 of file TriangulatedSurface.h.

References DGtal::TriangulatedSurface< TPoint >::nbFaces().

312  {
313  return IndexedPropertyMap< AnyData >( *this, nbFaces(), value );
314  }

◆ makeVertexMap() [1/2]

template<typename TPoint>
template<typename AnyData >
IndexedPropertyMap< AnyData > DGtal::TriangulatedSurface< TPoint >::makeVertexMap ( ) const
inline
Returns
a vertex property map that associates some data to any vertex.

Definition at line 273 of file TriangulatedSurface.h.

References DGtal::TriangulatedSurface< TPoint >::nbVertices().

274  {
275  return IndexedPropertyMap< AnyData >( *this, nbVertices() );
276  }

◆ makeVertexMap() [2/2]

template<typename TPoint>
template<typename AnyData >
IndexedPropertyMap< AnyData > DGtal::TriangulatedSurface< TPoint >::makeVertexMap ( AnyData  value) const
inline
Parameters
valuethe value that is given to all vertices at initialization.
Returns
a vertex property map that associates some data to any vertex.

Definition at line 281 of file TriangulatedSurface.h.

References DGtal::TriangulatedSurface< TPoint >::nbVertices().

282  {
283  return IndexedPropertyMap< AnyData >( *this, nbVertices(), value );
284  }

◆ nbArcs()

template<typename TPoint>
Size DGtal::TriangulatedSurface< TPoint >::nbArcs ( ) const
inline
Returns
the number of half edges in the structure.

Definition at line 248 of file TriangulatedSurface.h.

References DGtal::TriangulatedSurface< TPoint >::myHEDS, and DGtal::HalfEdgeDataStructure::nbHalfEdges().

Referenced by SCENARIO().

248 { return myHEDS.nbHalfEdges(); }
HalfEdgeDataStructure myHEDS
The half-edge data structure that stores the topology of the mesh.

◆ nbEdges()

template<typename TPoint>
Size DGtal::TriangulatedSurface< TPoint >::nbEdges ( ) const
inline
Returns
the number of unoriented edges in the structure.

Definition at line 254 of file TriangulatedSurface.h.

References DGtal::TriangulatedSurface< TPoint >::myHEDS, and DGtal::HalfEdgeDataStructure::nbEdges().

Referenced by DGtal::TriangulatedSurface< TPoint >::makeEdgeMap(), and SCENARIO().

254 { return myHEDS.nbEdges(); }
HalfEdgeDataStructure myHEDS
The half-edge data structure that stores the topology of the mesh.

◆ nbFaces()

template<typename TPoint>
Size DGtal::TriangulatedSurface< TPoint >::nbFaces ( ) const
inline
Returns
the number of faces in the structure.

Definition at line 257 of file TriangulatedSurface.h.

References DGtal::TriangulatedSurface< TPoint >::myHEDS, and DGtal::HalfEdgeDataStructure::nbFaces().

Referenced by DGtal::TriangulatedSurface< TPoint >::makeFaceMap(), and SCENARIO().

257 { return myHEDS.nbFaces(); }
HalfEdgeDataStructure myHEDS
The half-edge data structure that stores the topology of the mesh.

◆ nbVertices()

template<typename TPoint>
Size DGtal::TriangulatedSurface< TPoint >::nbVertices ( ) const
inline
Returns
the number of vertices in the structure.

Definition at line 251 of file TriangulatedSurface.h.

References DGtal::TriangulatedSurface< TPoint >::myHEDS, and DGtal::HalfEdgeDataStructure::nbVertices().

Referenced by DGtal::TriangulatedSurface< TPoint >::end(), DGtal::TriangulatedSurface< TPoint >::makeVertexMap(), and SCENARIO().

251 { return myHEDS.nbVertices(); }
HalfEdgeDataStructure myHEDS
The half-edge data structure that stores the topology of the mesh.

◆ next()

template<typename TPoint>
Arc DGtal::TriangulatedSurface< TPoint >::next ( const Arc a) const

Constant-time access to the next arc

Parameters
aany arc (s,t)
Returns
the next arc

◆ opposite()

template<typename TPoint>
Arc DGtal::TriangulatedSurface< TPoint >::opposite ( const Arc a) const
Parameters
aany arc (s,t)
Returns
the arc (t,s)

◆ outArcs()

template<typename TPoint>
ArcRange DGtal::TriangulatedSurface< TPoint >::outArcs ( const Vertex v) const
Parameters
vany vertex of the surface.
Returns
the outgoing arcs from [v]

◆ position() [1/2]

template<typename TPoint>
Point& DGtal::TriangulatedSurface< TPoint >::position ( Vertex  v)

Mutable accessor to vertex data.

Parameters
vany vertex.
Returns
the mutable data associated to v.

◆ position() [2/2]

template<typename TPoint>
const Point& DGtal::TriangulatedSurface< TPoint >::position ( Vertex  v) const

Const accessor to vertex data.

Parameters
vany vertex.
Returns
the non-mutable data associated to v.

◆ positions()

template<typename TPoint>
PositionsMap DGtal::TriangulatedSurface< TPoint >::positions ( )
inline
Returns
the property map stored in the surface that defines vertex positions.
Note
The returned map only references what is stored in the surface.

Definition at line 266 of file TriangulatedSurface.h.

References DGtal::TriangulatedSurface< TPoint >::myPositions.

Referenced by SCENARIO().

267  {
268  return PositionsMap( *this, myPositions );
269  }
PositionsStorage myPositions
Stores the information for each Vertex.
IndexedPropertyMap< Point > PositionsMap

◆ selfDisplay()

template<typename TPoint>
void DGtal::TriangulatedSurface< TPoint >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

◆ size()

template<typename TPoint>
Size DGtal::TriangulatedSurface< TPoint >::size ( ) const
Returns
the number of vertices of the surface.

Referenced by SCENARIO().

◆ tail()

template<typename TPoint>
Vertex DGtal::TriangulatedSurface< TPoint >::tail ( const Arc a) const
Parameters
aany arc (s,t)
Returns
the vertex s

◆ verticesAroundFace()

template<typename TPoint>
VertexRange DGtal::TriangulatedSurface< TPoint >::verticesAroundFace ( const Face f) const

If f is incident to the arcs (s,t) and (t,u) (say), then (s,t,u) is a subsequence of the returned sequence.

Parameters
fany valid face on the surface (open or closed ).
Returns
the sequence of vertices that touches this face. The order follows the order of incident arcs (the range size should be 3).

Referenced by SCENARIO().

◆ writeNeighbors() [1/2]

template<typename TPoint>
template<typename OutputIterator >
void DGtal::TriangulatedSurface< TPoint >::writeNeighbors ( OutputIterator &  it,
const Vertex v 
) const

Writes the neighbors of a vertex using an output iterator

Template Parameters
OutputIteratorthe type of an output iterator writing in a container of vertices.
Parameters
itthe output iterator
vthe vertex whose neighbors will be writen

◆ writeNeighbors() [2/2]

template<typename TPoint>
template<typename OutputIterator , typename VertexPredicate >
void DGtal::TriangulatedSurface< TPoint >::writeNeighbors ( OutputIterator &  it,
const Vertex v,
const VertexPredicate &  pred 
) const

Writes the neighbors of a vertex which satisfy a predicate using an output iterator

Template Parameters
OutputIteratorthe type of an output iterator writing in a container of vertices.
VertexPredicatethe type of the predicate
Parameters
itthe output iterator
vthe vertex whose neighbors will be written
predthe predicate that must be satisfied

Field Documentation

◆ isHEDSValid

template<typename TPoint>
bool DGtal::TriangulatedSurface< TPoint >::isHEDSValid
protected

Indicates if the half-edge structure has been created/updated.

Definition at line 549 of file TriangulatedSurface.h.

◆ myHEDS

template<typename TPoint>
HalfEdgeDataStructure DGtal::TriangulatedSurface< TPoint >::myHEDS
protected

◆ myPositions

template<typename TPoint>
PositionsStorage DGtal::TriangulatedSurface< TPoint >::myPositions
protected

Stores the information for each Vertex.

Definition at line 553 of file TriangulatedSurface.h.

Referenced by DGtal::TriangulatedSurface< TPoint >::positions().

◆ myTriangles

template<typename TPoint>
TriangleStorage DGtal::TriangulatedSurface< TPoint >::myTriangles
protected

Stores the triangles.

Definition at line 555 of file TriangulatedSurface.h.


The documentation for this class was generated from the following file: