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,
272 void removeFaces(
const std::vector<unsigned int> &facesIndex);
279 const TPoint &
getVertex(
unsigned int i)
const;
396 FaceStorage::const_iterator
408 FaceStorage::const_iterator
419 FaceStorage::iterator
431 FaceStorage::iterator
467 void changeScale(
const typename TPoint::Component aScale);
577 template <
typename TValue>
581 const unsigned int lengthSequence,
582 double stepX,
double stepY,
double stepZ,
600 typename TPoint::Dimension
myDim;
619 template <
typename TPo
int>
621 operator<< ( std::ostream & out,
const Mesh<TPoint> &
object );
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)
HalfEdgeDataStructure::Size Size
unsigned int quadToTriangularFaces()
FaceStorage::const_iterator faceEnd() const
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
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
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)
bool operator()(const TPoint &p1, const TPoint &p2)
VertexStorage myVertexList
void addQuadFace(unsigned int indexVertex1, unsigned int indexVertex2, unsigned int indexVertex3, unsigned int indexVertex4, const DGtal::Color &aColor=DGtal::Color::White)