31 #if defined(Mesh_RECURSES)
32 #error Recursive header files inclusion detected in Mesh.h
33 #else // defined(Mesh_RECURSES)
45 #include "DGtal/base/Common.h"
46 #include "DGtal/kernel/PointVector.h"
47 #include "DGtal/io/Color.h"
90 template <
typename TPo
int >
148 typedef typename std::size_t
Size;
161 Mesh(
bool saveFaceColor=
false);
176 Mesh(
const std::vector<TPoint> &vertexSet);
233 void addTriangularFace(
unsigned int indexVertex1,
unsigned int indexVertex2,
unsigned int indexVertex3,
250 void addQuadFace(
unsigned int indexVertex1,
unsigned int indexVertex2,
251 unsigned int indexVertex3,
unsigned int indexVertex4,
396 FaceStorage::const_iterator
408 FaceStorage::const_iterator
419 FaceStorage::iterator
431 FaceStorage::iterator
577 template <
typename TValue>
581 const unsigned int lengthSequence,
582 double stepX,
double stepY,
double stepZ,
619 template <
typename TPo
int>
630 #include "DGtal/shapes/Mesh.ih"
635 #endif // !defined Mesh_h
638 #endif // else defined(Mesh_RECURSES)
MyDigitalSurface::ConstIterator ConstIterator
void addTriangularFace(unsigned int indexVertex1, unsigned int indexVertex2, unsigned int indexVertex3, const DGtal::Color &aColor=DGtal::Color::White)
void changeScale(const typename TPoint::Component aScale)
FaceStorage::iterator faceEnd()
void invertVertexFaceOrder()
const MeshFace & getFace(unsigned int i) const
void setFaceColor(unsigned int i, const DGtal::Color &aColor)
const Color & getFaceColor(unsigned int i) const
std::vector< TPoint > VertexStorage
Structure representing an RGB triple with alpha component.
void addFace(const MeshFace &aFace, const DGtal::Color &aColor=DGtal::Color::White)
std::vector< DGtal::Color > ColorStorage
FaceStorage::iterator faceBegin()
CompPoints(typename TPoint::Dimension d)
ConstIterator vertexEnd() const
Mesh(bool saveFaceColor=false)
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)
ConstIterator vertexBegin() const
void addVertex(const TPoint &vertex)
Mesh & operator=(const Mesh &other)
Mesh(const std::vector< TPoint > &vertexSet)
unsigned int quadToTriangularFaces()
FaceStorage::const_iterator faceEnd() const
DGtal::PointVector< TPoint::dimension, double > RealPoint
RealPoint getFaceBarycenter(unsigned int i) const
Aim: This class is defined to represent a surface mesh through a set of vertices and faces....
std::vector< MeshFace > FaceStorage
DGtal is the top-level namespace which contains all DGtal functions and types.
const TPoint & getVertex(unsigned int i) const
VertexStorage::iterator Iterator
VertexStorage::const_iterator ConstIterator
ColorStorage myFaceColorList
std::vector< unsigned int > MeshFace
std::pair< TPoint, TPoint > getBoundingBox() const
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
DGtal::Color myDefaultColor
bool isStoringFaceColors() const
void removeFaces(const std::vector< unsigned int > &facesIndex)
void selfDisplay(std::ostream &out) const
std::string className() const
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)
Aim: Implements basic operations that will be used in Point and Vector classes.
FaceStorage::const_iterator faceBegin() const
double subDivideTriangularFaces(const double minArea)
Mesh(const DGtal::Color &aColor)
TPoint & getVertex(unsigned int i)
bool operator()(const TPoint &p1, const TPoint &p2)
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)
VertexStorage myVertexList
MeshFace & getFace(unsigned int i)
void addQuadFace(unsigned int indexVertex1, unsigned int indexVertex2, unsigned int indexVertex3, unsigned int indexVertex4, const DGtal::Color &aColor=DGtal::Color::White)