31 #if defined(Mesh_RECURSES)
32 #error Recursive header files inclusion detected in Mesh.h
45 #include "DGtal/base/Common.h"
46 #include "DGtal/kernel/PointVector.h"
47 #include "DGtal/io/Color.h"
90 template <
typename TPo
int >
120 typedef typename VertexStorage::size_type
Index;
153 typedef typename std::size_t
Size;
166 Mesh(
bool saveFaceColor=
false);
181 Mesh(
const std::vector<TPoint> &vertexSet);
401 typename FaceStorage::const_iterator
413 typename FaceStorage::const_iterator
424 typename FaceStorage::iterator
436 typename FaceStorage::iterator
484 void rescale(
const typename TPoint::Component aScale);
583 template <
typename TValue>
587 const unsigned int lengthSequence,
588 double stepX,
double stepY,
double stepZ,
625 template <
typename TPo
int>
636 #include "DGtal/shapes/Mesh.ih"
Structure representing an RGB triple with alpha component.
Aim: This class is defined to represent a surface mesh through a set of vertices and faces....
Mesh(const DGtal::Color &aColor)
DGtal::PointVector< TPoint::dimension, double > RealPoint
std::vector< TPoint > VertexStorage
const TPoint & getVertex(Index i) const
void addQuadFace(Index indexVertex1, Index indexVertex2, Index indexVertex3, Index indexVertex4, const DGtal::Color &aColor=DGtal::Color::White)
void rescale(const typename TPoint::Component aScale)
ColorStorage myFaceColorList
RealPoint getFaceBarycenter(Index i) const
unsigned int quadToTriangularFaces()
void selfDisplay(std::ostream &out) const
void addFace(const MeshFace &aFace, const DGtal::Color &aColor=DGtal::Color::White)
std::pair< TPoint, TPoint > getBoundingBox() const
VertexStorage::iterator Iterator
void setFaceColor(Index i, const DGtal::Color &aColor)
const Color & getFaceColor(Index i) const
std::vector< DGtal::Color > ColorStorage
const MeshFace & getFace(Index i) const
FaceStorage::const_iterator faceEnd() const
std::string className() const
VertexStorage::const_iterator ConstIterator
void invertVertexFaceOrder()
Mesh(const std::vector< TPoint > &vertexSet)
static void createMeshFromHeightSequence(Mesh< TPoint > &aMesh, const std::vector< TValue > &anValueSequence, const unsigned int lengthSequence, double stepX, double stepY, double stepZ, const DGtal::Color &aMeshColor=DGtal::Color::White)
MeshFace & getFace(Index i)
ConstIterator vertexEnd() const
VertexStorage::size_type Index
TPoint & getVertex(Index i)
Mesh & operator=(const Mesh &other)
std::vector< Index > MeshFace
void removeFaces(const std::vector< Index > &facesIndex)
double subDivideTriangularFaces(const double minArea)
Mesh(bool saveFaceColor=false)
std::vector< MeshFace > FaceStorage
VertexStorage myVertexList
DGtal::Color myDefaultColor
void addTriangularFace(Index indexVertex1, Index indexVertex2, Index indexVertex3, const DGtal::Color &aColor=DGtal::Color::White)
static void createTubularMesh(Mesh< TPoint > &aMesh, const std::vector< TPoint > &aSkeleton, const std::vector< double > &aVectOfRadius, const double angleStep=0.2, const DGtal::Color &aMeshColor=DGtal::Color::White)
bool isStoringFaceColors() const
FaceStorage::iterator faceBegin()
FaceStorage::const_iterator faceBegin() const
FaceStorage::iterator faceEnd()
ConstIterator vertexBegin() const
void removeIsolatedVertices()
static void createTubularMesh(Mesh< TPoint > &aMesh, const std::vector< TPoint > &aSkeleton, const double aRadius, const double angleStep=0.2, const DGtal::Color &aMeshColor=DGtal::Color::White)
void addVertex(const TPoint &vertex)
Aim: Implements basic operations that will be used in Point and Vector classes.
MyDigitalSurface::ConstIterator ConstIterator
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
bool operator()(const TPoint &p1, const TPoint &p2)
CompPoints(typename TPoint::Dimension d)