31 #if defined(TriangulatedSurface_RECURSES)
32 #error Recursive header files inclusion detected in TriangulatedSurface.h
35 #define TriangulatedSurface_RECURSES
37 #if !defined TriangulatedSurface_h
39 #define TriangulatedSurface_h
46 #include "DGtal/base/Common.h"
47 #include "DGtal/base/OwningOrAliasingPtr.h"
48 #include "DGtal/base/IntegerSequenceIterator.h"
49 #include "DGtal/topology/HalfEdgeDataStructure.h"
84 template <
typename TPo
int>
103 typedef typename std::map<Vertex, Value>
Type;
127 template <
typename TData>
155 myData( &aStorage, false )
284 template <
typename AnyData>
292 template <
typename AnyData>
299 template <
typename AnyData>
307 template <
typename AnyData>
314 template <
typename AnyData>
322 template <
typename AnyData>
370 template <
typename OutputIterator>
391 template <
typename OutputIterator,
typename VertexPredicate>
395 const VertexPredicate & pred)
const;
688 template <
typename TPo
int>
697 #include "DGtal/shapes/TriangulatedSurface.ih"
704 #undef TriangulatedSurface_RECURSES
Aim: This class represents an half-edge data structure, which is a structure for representing the top...
Index HalfEdgeIndex
The type used for numbering half-edges (alias)
Index FaceIndex
The type for numbering faces.
Index EdgeIndex
The type for numbering edges.
std::size_t Index
The type used for numbering half-edges (an offset an the half-edges structure).
Index VertexIndex
The type for numbering vertices.
std::size_t Size
The type for counting elements.
Aim: It is a simple class that mimics a (non mutable) iterator over integers. You can increment it,...
Aim: Represents a triangulated surface. The topology is stored with a half-edge data structure....
void selfDisplay(std::ostream &out) const
Size degree(const Vertex &v) const
VertexRange verticesOfFacesAroundArc(const Arc a) const
VertexRange allBoundaryVertices() const
ConstIterator begin() const
HalfEdgeDataStructure::HalfEdgeIndex Arc
void clear()
Clears everything.
void writeNeighbors(OutputIterator &it, const Vertex &v) const
std::vector< Vertex > VertexRange
HalfEdgeDataStructure::FaceIndex Face
Vertex head(const Arc &a) const
bool isFlippable(const Arc a) const
Arc arc(const Vertex &t, const Vertex &h) const
TriangleStorage myTriangles
Stores the triangles.
ArcRange arcsAroundFace(const Face &f) const
HalfEdgeDataStructure myHEDS
The half-edge data structure that stores the topology of the mesh.
ArcRange allBoundaryArcs() const
std::set< Vertex > VertexSet
HalfEdgeDataStructure::VertexIndex VertexIndex
IntegerSequenceIterator< VertexIndex > ConstIterator
BOOST_STATIC_CONSTANT(Face, INVALID_FACE=HALF_EDGE_INVALID_INDEX)
IndexedPropertyMap< AnyData > makeFaceMap() const
IndexedPropertyMap< AnyData > makeVertexMap(AnyData value) const
FaceRange facesAroundVertex(const Vertex &v) const
Vertex merge(const Arc a, const Point &data)
FaceRange allFaces() const
IndexedPropertyMap< AnyData > makeEdgeMap() const
Point & position(Vertex v)
PositionsStorage myPositions
Stores the information for each Vertex.
std::vector< Point > PositionsStorage
Arc opposite(const Arc &a) const
HalfEdgeDataStructure::Index Index
VertexRange allVertices() const
const Point & position(Vertex v) const
VertexIndex addVertex(const Point &vdata)
HalfEdgeDataStructure::Triangle Triangle
void writeNeighbors(OutputIterator &it, const Vertex &v, const VertexPredicate &pred) const
Vertex tail(const Arc &a) const
HalfEdgeDataStructure::EdgeIndex EdgeIndex
bool isMergeable(const Arc a) const
HalfEdgeDataStructure & heds()
Arc next(const Arc &a) const
ArcRange outArcs(const Vertex &v) const
const HalfEdgeDataStructure & heds() const
HalfEdgeDataStructure::HalfEdge HalfEdge
FaceIndex addTriangle(VertexIndex v0, VertexIndex v1, VertexIndex v2)
bool isHEDSValid
Indicates if the half-edge structure has been created/updated.
bool isArcBoundary(const Arc &v) const
IndexedPropertyMap< AnyData > makeFaceMap(AnyData value) const
std::vector< Triangle > TriangleStorage
IndexedPropertyMap< AnyData > makeVertexMap() const
VertexRange verticesAroundFace(const Face &f) const
ArcRange inArcs(const Vertex &v) const
bool isVertexBoundary(const Vertex &v) const
HalfEdgeDataStructure::Size Size
IndexedPropertyMap< Point > PositionsMap
IndexedPropertyMap< AnyData > makeEdgeMap(AnyData value) const
FaceRange facesAroundArc(const Arc &a) const
Size bestCapacity() const
HalfEdgeDataStructure::FaceIndex FaceIndex
Face faceAroundArc(const Arc &a) const
TriangulatedSurface< TPoint > Self
std::vector< Arc > ArcRange
Vertex split(const Arc a, const Point &data)
std::vector< Face > FaceRange
ConstIterator end() const
DGtal is the top-level namespace which contains all DGtal functions and types.
static std::size_t const HALF_EDGE_INVALID_INDEX
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
Represents an unoriented triangle as three vertices.
Data & operator[](Argument v)
const Self * mySurface
The associated polygonal surface.
const Self & surface() const
IndexedPropertyMap()
Default constructor. The object is invalid.
std::vector< Data > Storage
OwningOrAliasingPtr< Storage > myData
An owned or aliased pointer to the vector of data.
const Storage & storage() const
const Data & operator[](Argument v) const
IndexedPropertyMap(const Self &aSurface, Storage &aStorage)
const Data & operator()(Argument v) const
IndexedPropertyMap(const Self &aSurface, Size s, Data def_data=Data())
std::map< Vertex, Value > Type