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

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). More...

#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 ()
 Clears everything. More...
 
bool build ()
 
VertexIndex addVertex (const Point &vdata)
 
FaceIndex addTriangle (VertexIndex v0, VertexIndex v1, VertexIndex v2)
 
const HalfEdgeDataStructureheds () const
 
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
 
ArcRange arcsAroundFace (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
 Indicates if the half-edge structure has been created/updated. More...
 
HalfEdgeDataStructure myHEDS
 The half-edge data structure that stores the topology of the mesh. More...
 
PositionsStorage myPositions
 Stores the information for each Vertex. More...
 
TriangleStorage myTriangles
 Stores the triangles. More...
 

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
Note
You may access the underlying half-edge data structure through PolygonalSurface::heds method.
Examples
shapes/viewMarchingCubes.cpp.

Definition at line 84 of file TriangulatedSurface.h.

Member Typedef Documentation

◆ Arc

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

Definition at line 110 of file TriangulatedSurface.h.

◆ ArcRange

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

Definition at line 112 of file TriangulatedSurface.h.

◆ ConstIterator

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

Definition at line 107 of file TriangulatedSurface.h.

◆ Edge

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

Definition at line 106 of file TriangulatedSurface.h.

◆ EdgeIndex

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

Definition at line 92 of file TriangulatedSurface.h.

◆ Face

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

Definition at line 111 of file TriangulatedSurface.h.

◆ FaceIndex

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

Definition at line 93 of file TriangulatedSurface.h.

◆ FaceRange

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

Definition at line 113 of file TriangulatedSurface.h.

◆ HalfEdge

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

Definition at line 213 of file TriangulatedSurface.h.

◆ Index

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

Definition at line 90 of file TriangulatedSurface.h.

◆ Point

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

Definition at line 87 of file TriangulatedSurface.h.

◆ PositionsMap

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

Definition at line 210 of file TriangulatedSurface.h.

◆ PositionsStorage

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

Definition at line 95 of file TriangulatedSurface.h.

◆ Self

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

Definition at line 88 of file TriangulatedSurface.h.

◆ Size

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

Definition at line 89 of file TriangulatedSurface.h.

◆ Triangle

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

Definition at line 94 of file TriangulatedSurface.h.

◆ TriangleStorage

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

Definition at line 96 of file TriangulatedSurface.h.

◆ Vertex

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

Definition at line 99 of file TriangulatedSurface.h.

◆ VertexIndex

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

Definition at line 91 of file TriangulatedSurface.h.

◆ VertexRange

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

Definition at line 114 of file TriangulatedSurface.h.

◆ VertexSet

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

Definition at line 100 of file TriangulatedSurface.h.

Constructor & Destructor Documentation

◆ ~TriangulatedSurface()

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

Destructor.

Definition at line 221 of file TriangulatedSurface.h.

221 {}

◆ TriangulatedSurface()

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

Constructor.

Definition at line 226 of file TriangulatedSurface.h.

226 : 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.

Referenced by laplacian().

◆ 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().

◆ arcsAroundFace()

template<typename TPoint>
ArcRange DGtal::TriangulatedSurface< TPoint >::arcsAroundFace ( const Face f) const
Parameters
fany valid face on the surface. (open or closed ).
Note
By construction, each anArc returned by the method on a face f is such that this->faceAroundArc(anArc) == f.
Returns
the sequence of arcs that touches this face in their natural order (the range size should be 3).

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 393 of file TriangulatedSurface.h.

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

Referenced by SCENARIO().

◆ 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 397 of file TriangulatedSurface.h.

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

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

Referenced by SCENARIO().

◆ 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 269 of file TriangulatedSurface.h.

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

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

Referenced by SCENARIO().

◆ 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].

Referenced by laplacian().

◆ head()

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

Referenced by laplacian(), and SCENARIO().

◆ heds()

template<typename TPoint>
const HalfEdgeDataStructure& DGtal::TriangulatedSurface< TPoint >::heds ( ) const
inline
Returns
a const reference to the half-edge data structure.

Definition at line 249 of file TriangulatedSurface.h.

250  { return myHEDS; }
HalfEdgeDataStructure myHEDS
The half-edge data structure that stores the topology of the mesh.

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

◆ 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 295 of file TriangulatedSurface.h.

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

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

◆ 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 303 of file TriangulatedSurface.h.

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

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

◆ 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 310 of file TriangulatedSurface.h.

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

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

◆ 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 318 of file TriangulatedSurface.h.

319  {
320  return IndexedPropertyMap< AnyData >( *this, nbFaces(), value );
321  }

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

◆ 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 280 of file TriangulatedSurface.h.

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

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

◆ 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 288 of file TriangulatedSurface.h.

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

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

◆ nbArcs()

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

Definition at line 255 of file TriangulatedSurface.h.

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

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

Referenced by SCENARIO().

◆ nbEdges()

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

Definition at line 261 of file TriangulatedSurface.h.

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

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

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

◆ nbFaces()

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

Definition at line 264 of file TriangulatedSurface.h.

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

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

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

◆ nbVertices()

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

Definition at line 258 of file TriangulatedSurface.h.

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

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

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

◆ 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

Referenced by laplacian().

◆ opposite()

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

Referenced by laplacian().

◆ 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]

Referenced by laplacian().

◆ 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.

Referenced by laplacian().

◆ 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 273 of file TriangulatedSurface.h.

274  {
275  return PositionsMap( *this, myPositions );
276  }
PositionsStorage myPositions
Stores the information for each Vertex.
IndexedPropertyMap< Point > PositionsMap

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

Referenced by SCENARIO().

◆ 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 laplacian(), and 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 567 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 571 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 573 of file TriangulatedSurface.h.


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