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 >
157 Mesh(
bool saveFaceColor=
false);
172 Mesh(
const std::vector<TPoint> &vertexSet);
229 void addTriangularFace(
unsigned int indexVertex1,
unsigned int indexVertex2,
unsigned int indexVertex3,
246 void addQuadFace(
unsigned int indexVertex1,
unsigned int indexVertex2,
247 unsigned int indexVertex3,
unsigned int indexVertex4,
268 void removeFaces(
const std::vector<unsigned int> &facesIndex);
275 const TPoint &
getVertex(
unsigned int i)
const;
289 const MeshFace &
getFace(
unsigned int i)
const;
304 MeshFace &
getFace(
unsigned int i);
392 FaceStorage::const_iterator
404 FaceStorage::const_iterator
415 FaceStorage::iterator
427 FaceStorage::iterator
570 template <
typename TValue>
574 const unsigned int lengthSequence,
575 double stepX,
double stepY,
double stepZ,
593 typename TPoint::Dimension
myDim;
612 template <
typename TPo
int>
614 operator<< ( std::ostream & out, const Mesh<TPoint> & object );
623 #include "DGtal/shapes/Mesh.ih" 628 #endif // !defined Mesh_h 631 #endif // else defined(Mesh_RECURSES) std::vector< TPoint > VertexStorage
std::vector< unsigned int > MeshFace
void changeScale(const double aScale)
void addQuadFace(unsigned int indexVertex1, unsigned int indexVertex2, unsigned int indexVertex3, unsigned int indexVertex4, const DGtal::Color &aColor=DGtal::Color::White)
void removeFaces(const std::vector< unsigned int > &facesIndex)
VertexStorage myVertexList
unsigned int nbVertex() const
std::vector< DGtal::Color > ColorStorage
VertexStorage::const_iterator ConstIterator
unsigned int nbFaces() const
Aim: This class is defined to represent a surface mesh through a set of vertices and faces...
FaceStorage::const_iterator faceEnd() const
Aim: Implements basic operations that will be used in Point and Vector classes.
void selfDisplay(std::ostream &out) const
ConstIterator vertexBegin() 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)
bool operator()(const TPoint &p1, const TPoint &p2)
const TPoint & getVertex(unsigned int i) const
void addVertex(const TPoint &vertex)
bool isStoringFaceColors() const
ColorStorage myFaceColorList
VertexStorage::iterator Iterator
const Color & getFaceColor(unsigned int i) const
std::pair< TPoint, TPoint > getBoundingBox() const
void addTriangularFace(unsigned int indexVertex1, unsigned int indexVertex2, unsigned int indexVertex3, const DGtal::Color &aColor=DGtal::Color::White)
std::vector< MeshFace > FaceStorage
FaceStorage::iterator faceEnd()
ConstIterator vertexEnd() const
DGtal is the top-level namespace which contains all DGtal functions and types.
FaceStorage::const_iterator faceBegin() const
const MeshFace & getFace(unsigned int i) const
void setFaceColor(unsigned int i, const DGtal::Color &aColor)
Mesh(bool saveFaceColor=false)
CompPoints(typename TPoint::Dimension d)
RealPoint getFaceBarycenter(unsigned int i) const
unsigned int quadToTriangularFaces()
void addFace(const MeshFace &aFace, const DGtal::Color &aColor=DGtal::Color::White)
DGtal::PointVector< TPoint::dimension, double > RealPoint
Structure representing an RGB triple with alpha component.
void invertVertexFaceOrder()
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)
std::string className() const
FaceStorage::iterator faceBegin()
DGtal::Color myDefaultColor
double subDivideTriangularFaces(const double minArea)
Mesh & operator=(const Mesh &other)