Loading [MathJax]/extensions/TeX/AMSsymbols.js
DGtal 2.0.0
meshFromOFF.cpp
Go to the documentation of this file.
1
16
29
30
40
41
43
44
46#include "DGtal/io/readers/MeshReader.h"
48
49#include "DGtal/io/Display3D.h"
50#include "DGtal/io/viewers/PolyscopeViewer.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 PolyscopeViewer<> viewer;
63 std::string inputFilename = examplesPath + "samples/tref.off";
64 // Since the input points are not necessary integers we use the PointD3D from Display3D.
65 Mesh<Viewer3D<>::RealPoint> anImportedMesh;
66 anImportedMesh << inputFilename;
68 trace.info()<< "importating done..."<< endl;
70 viewer << anImportedMesh;
73 viewer.show();
74 return 0;
75}
76
Aim: This class is defined to represent a surface mesh through a set of vertices and faces....
Definition Mesh.h:92
void show() override
Starts the event loop and display of elements.
DGtal is the top-level namespace which contains all DGtal functions and types.
Trace trace
STL namespace.
int main()
Definition testBits.cpp:56