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 EdgeIndex
The type for numbering edges.
Index HalfEdgeIndex
The type used for numbering half-edges (alias)
Index VertexIndex
The type for numbering vertices.
std::size_t Size
The type for counting elements.
Index FaceIndex
The type for numbering faces.
std::size_t Index
The type used for numbering half-edges (an offset an the half-edges structure).
std::vector< VertexIndex > PolygonalFace
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...
ConstIterator begin() const
FaceRange facesAroundArc(const Arc &a) const
HalfEdgeDataStructure::PolygonalFace PolygonalFace
std::vector< Face > FaceRange
const HalfEdgeDataStructure & heds() const
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
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
Point & position(Vertex v)
Arc next(const Arc &a) const
Arc opposite(const Arc &a) const
IntegerSequenceIterator< VertexIndex > ConstIterator
HalfEdgeDataStructure::FaceIndex FaceIndex
Arc arc(const Vertex &t, const Vertex &h) const
FaceRange facesAroundVertex(const Vertex &v) const
PolygonalSurface(Clone< HalfEdgeDataStructure > aHeds, Clone< PositionsStorage > pos)
HalfEdgeDataStructure::VertexIndex VertexIndex
PolygonalFacesStorage myPolygonalFaces
Stores the polygonal faces.
HalfEdgeDataStructure::Size Size
bool isVertexBoundary(const Vertex &v) const
IndexedPropertyMap< Point > PositionsMap
VertexRange verticesAroundFace(const Face &f) const
void writeNeighbors(OutputIterator &it, const Vertex &v, const VertexPredicate &pred) const
IndexedPropertyMap< AnyData > makeEdgeMap() const
HalfEdgeDataStructure & heds()
void selfDisplay(std::ostream &out) const
PositionsStorage myPositions
Stores the information for each Vertex.
HalfEdgeDataStructure::HalfEdge HalfEdge
HalfEdgeDataStructure::EdgeIndex EdgeIndex
FaceRange allFaces() const
HalfEdgeDataStructure::FaceIndex Face
Vertex tail(const Arc &a) const
Size degree(const Vertex &v) const
VertexIndex addVertex(const Point &vdata)
HalfEdgeDataStructure myHEDS
The half-edge data structure that stores the topology of the mesh.
BOOST_STATIC_CONSTANT(Face, INVALID_FACE=HALF_EDGE_INVALID_INDEX)
std::vector< Vertex > VertexRange
IndexedPropertyMap< AnyData > makeVertexMap(AnyData value) const
HalfEdgeDataStructure::Index Index
HalfEdgeDataStructure::Triangle Triangle
Face faceAroundArc(const Arc &a) const
Size bestCapacity() const
Vertex head(const Arc &a) const
VertexRange allVertices() const
ArcRange outArcs(const Vertex &v) const
FaceIndex addPolygonalFace(const PolygonalFace &f)
std::vector< PolygonalFace > PolygonalFacesStorage
void clear()
Clears everything.
PolygonalSurface< TPoint > Self
std::set< Vertex > VertexSet
bool isArcBoundary(const Arc &v) const
std::vector< Point > PositionsStorage
IndexedPropertyMap< AnyData > makeFaceMap() const
std::vector< Arc > ArcRange
ArcRange inArcs(const Vertex &v) const
HalfEdgeDataStructure::HalfEdgeIndex Arc
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.
std::vector< Data > Storage
IndexedPropertyMap(const Self &aSurface, Size s, Data def_data=Data())
const Storage & storage() const
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