31#if defined(PolygonalSurface_RECURSES)
32#error Recursive header files inclusion detected in PolygonalSurface.h
35#define PolygonalSurface_RECURSES
37#if !defined PolygonalSurface_h
39#define PolygonalSurface_h
46#include "DGtal/base/Common.h"
47#include "DGtal/base/Clone.h"
48#include "DGtal/base/OwningOrAliasingPtr.h"
49#include "DGtal/base/IntegerSequenceIterator.h"
50#include "DGtal/topology/HalfEdgeDataStructure.h"
85 template <
typename TPo
int>
105 typedef typename std::map<Vertex, Value>
Type;
129 template <
typename TData>
157 myData( &aStorage, false )
306 template <
typename AnyData>
314 template <
typename AnyData>
321 template <
typename AnyData>
329 template <
typename AnyData>
336 template <
typename AnyData>
344 template <
typename AnyData>
392 template <
typename OutputIterator>
413 template <
typename OutputIterator,
typename VertexPredicate>
417 const VertexPredicate & pred)
const;
623 template <
typename TPo
int>
632#include "DGtal/shapes/PolygonalSurface.ih"
639#undef PolygonalSurface_RECURSES
Aim: This class encapsulates its parameter class to indicate that the given parameter is required to ...
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)
std::vector< VertexIndex > PolygonalFace
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: This class describes a smart pointer that is, given the constructor called by the user,...
Aim: Represents a polygon mesh, i.e. a 2-dimensional combinatorial surface whose faces are (topologic...
HalfEdgeDataStructure::FaceIndex FaceIndex
ConstIterator begin() const
FaceRange facesAroundArc(const Arc &a) const
const HalfEdgeDataStructure & heds() const
std::vector< Point > PositionsStorage
std::vector< Vertex > VertexRange
void writeNeighbors(OutputIterator &it, const Vertex &v) const
bool isHEDSValid
Indicates if the half-edge structure has been created/updated.
ConstIterator end() const
IndexedPropertyMap< AnyData > makeVertexMap() const
ArcRange allBoundaryArcs() const
IndexedPropertyMap< AnyData > makeEdgeMap(AnyData value) const
HalfEdgeDataStructure::Index Index
HalfEdgeDataStructure::EdgeIndex EdgeIndex
FaceIndex addQuadrangle(VertexIndex v0, VertexIndex v1, VertexIndex v2, VertexIndex v3)
FaceIndex addTriangle(VertexIndex v0, VertexIndex v1, VertexIndex v2)
VertexRange allBoundaryVertices() const
const Point & position(Vertex v) const
ArcRange arcsAroundFace(const Face &f) const
HalfEdgeDataStructure::HalfEdge HalfEdge
Point & position(Vertex v)
Arc next(const Arc &a) const
Arc opposite(const Arc &a) const
Arc arc(const Vertex &t, const Vertex &h) const
FaceRange facesAroundVertex(const Vertex &v) const
PolygonalSurface(Clone< HalfEdgeDataStructure > aHeds, Clone< PositionsStorage > pos)
PolygonalFacesStorage myPolygonalFaces
Stores the polygonal faces.
bool isVertexBoundary(const Vertex &v) const
HalfEdgeDataStructure::Size Size
VertexRange verticesAroundFace(const Face &f) const
void writeNeighbors(OutputIterator &it, const Vertex &v, const VertexPredicate &pred) const
std::set< Vertex > VertexSet
IndexedPropertyMap< AnyData > makeEdgeMap() const
std::vector< PolygonalFace > PolygonalFacesStorage
HalfEdgeDataStructure & heds()
void selfDisplay(std::ostream &out) const
PositionsStorage myPositions
Stores the information for each Vertex.
FaceRange allFaces() const
Vertex tail(const Arc &a) const
HalfEdgeDataStructure::Triangle Triangle
Size degree(const Vertex &v) const
IndexedPropertyMap< Point > PositionsMap
VertexIndex addVertex(const Point &vdata)
HalfEdgeDataStructure myHEDS
The half-edge data structure that stores the topology of the mesh.
HalfEdgeDataStructure::PolygonalFace PolygonalFace
BOOST_STATIC_CONSTANT(Face, INVALID_FACE=HALF_EDGE_INVALID_INDEX)
IndexedPropertyMap< AnyData > makeVertexMap(AnyData value) const
HalfEdgeDataStructure::HalfEdgeIndex Arc
HalfEdgeDataStructure::VertexIndex VertexIndex
IntegerSequenceIterator< VertexIndex > ConstIterator
Face faceAroundArc(const Arc &a) const
Size bestCapacity() const
Vertex head(const Arc &a) const
std::vector< Arc > ArcRange
PolygonalSurface< TPoint > Self
VertexRange allVertices() const
ArcRange outArcs(const Vertex &v) const
FaceIndex addPolygonalFace(const PolygonalFace &f)
void clear()
Clears everything.
HalfEdgeDataStructure::FaceIndex Face
bool isArcBoundary(const Arc &v) const
IndexedPropertyMap< AnyData > makeFaceMap() const
std::vector< Face > FaceRange
ArcRange inArcs(const Vertex &v) const
IndexedPropertyMap< AnyData > makeFaceMap(AnyData value) 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 ClosedIntegerHalfPlane< TSpace > &object)
Represents an unoriented triangle as three vertices.
const Self & surface() const
const Self * mySurface
The associated polygonal surface.
IndexedPropertyMap(const Self &aSurface, Size s, Data def_data=Data())
const Storage & storage() const
std::vector< Data > Storage
OwningOrAliasingPtr< Storage > myData
An owned or aliased pointer to the vector of data.
const Data & operator[](Argument v) const
IndexedPropertyMap()
Default constructor. The object is invalid.
const Data & operator()(Argument v) const
IndexedPropertyMap(const Self &aSurface, Storage &aStorage)
Data & operator[](Argument v)
std::map< Vertex, Value > Type