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/PolyscopeViewer.h"
#include "DGtal/base/Common.h"
#include "DGtal/io/Color.h"
#include "ConfigExamples.h"
int main(
int argc,
char** argv )
{
PolyscopeViewer<> viewer;
std::string inputFilename = examplesPath + "samples/tref.off";
anImportedMesh << inputFilename;
trace.info()<<
"importating done..."<< endl;
viewer << anImportedMesh;
return 0;
}
Aim: This class is defined to represent a surface mesh through a set of vertices and faces....
void show() override
Starts the event loop and display of elements.
DGtal is the top-level namespace which contains all DGtal functions and types.