32 #include "DGtal/base/Common.h"
33 #include "DGtal/helpers/StdDefs.h"
35 #include "DGtal/shapes/Mesh.h"
36 #include "DGtal/io/writers/MeshWriter.h"
41 using namespace DGtal;
55 unsigned int nbok = 0;
60 vector<Point> vectVertex;
78 vector<DGtal::Color> vectColor;
88 bool isOK = aMesh >>
"test.off";
91 bool isOK2 = aMesh >>
"testColor.obj";
93 std::fstream exportObj;
94 exportObj.open(
"test.obj", std::fstream::out);
100 nbok += isOK ? 1 : 0;
101 nbok += isOK2 ? 1 : 0;
102 nbok += isOK3 ? 1 : 0;
104 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
105 <<
"true == true" << std::endl;
113 int main(
int argc,
char** argv )
117 for (
int i = 0; i < argc; ++i )
122 trace.
emphase() << ( res ?
"Passed." :
"Error." ) << endl;
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....
void addQuadFace(Index indexVertex1, Index indexVertex2, Index indexVertex3, Index indexVertex4, const DGtal::Color &aColor=DGtal::Color::White)
void addVertex(const TPoint &vertex)
void beginBlock(const std::string &keyword="")
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: Export a Mesh (Mesh object) in different format as OFF and OBJ).
int main(int argc, char **argv)