DGtal  1.2.0
meshFromOFF.cpp
Go to the documentation of this file.
1 
43 
44 
46 #include "DGtal/io/readers/MeshReader.h"
48 
49 #include "DGtal/io/Display3D.h"
50 #include "DGtal/io/viewers/Viewer3D.h"
51 
52 #include "DGtal/base/Common.h"
53 #include "DGtal/io/Color.h"
54 #include "ConfigExamples.h"
56 using namespace std;
57 using namespace DGtal;
59 
60 int main( int argc, char** argv )
61 {
62  QApplication application(argc,argv);
63  Viewer3D<> viewer;
64  viewer.show();
66  std::string inputFilename = examplesPath + "samples/tref.off";
67  // Since the input points are not necessary integers we use the PointD3D from Display3D.
68  Mesh<Viewer3D<>::RealPoint> anImportedMesh;
69  anImportedMesh << inputFilename;
71  trace.info()<< "importating done..."<< endl;
73  viewer.setLineColor(DGtal::Color(150,0,0,254));
74  viewer << anImportedMesh;
75  viewer << Viewer3D<>::updateDisplay;
77  return application.exec();
78 }
Structure representing an RGB triple with alpha component.
Definition: Color.h:67
virtual void setLineColor(DGtal::Color aColor)
Aim: This class is defined to represent a surface mesh through a set of vertices and faces....
Definition: Mesh.h:92
std::ostream & info()
virtual void show()
Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are w...
int main(int argc, char **argv)
Definition: meshFromOFF.cpp:60
DGtal is the top-level namespace which contains all DGtal functions and types.
Trace trace
Definition: Common.h:154