DGtal 1.3.0
Loading...
Searching...
No Matches
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"
56using namespace std;
57using namespace DGtal;
59
60int 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:68
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...
DGtal is the top-level namespace which contains all DGtal functions and types.
Trace trace
Definition: Common.h:154
STL namespace.
int main()
Definition: testBits.cpp:56