DGtal  1.2.0

Example of OFF file importation and display.

See also
Import 3D mesh from OFF file
Visualisation of the sample/tref.off file
#include "DGtal/io/readers/MeshReader.h"
#include "DGtal/io/Display3D.h"
#include "DGtal/io/viewers/Viewer3D.h"
#include "DGtal/base/Common.h"
#include "DGtal/io/Color.h"
#include "ConfigExamples.h"
using namespace std;
using namespace DGtal;
int main( int argc, char** argv )
QApplication application(argc,argv);
Viewer3D<> viewer;
std::string inputFilename = examplesPath + "samples/tref.off";
// Since the input points are not necessary integers we use the PointD3D from Display3D.
Mesh<Viewer3D<>::RealPoint> anImportedMesh;
anImportedMesh << inputFilename;
trace.info()<< "importating done..."<< endl;
viewer << anImportedMesh;
viewer << Viewer3D<>::updateDisplay;
return application.exec();
Structure representing an RGB triple with alpha component.
Definition: Color.h:67
std::ostream & info()
DGtal is the top-level namespace which contains all DGtal functions and types.
Trace trace
Definition: Common.h:154
int main(int argc, char **argv)
Z2i::RealPoint RealPoint