DGtal
2.1.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/PolyscopeViewer.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
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
}
DGtal::Mesh
Aim: This class is defined to represent a surface mesh through a set of vertices and faces....
Definition
Mesh.h:92
DGtal::PolyscopeViewer
Definition
PolyscopeViewer.h:52
DGtal::PolyscopeViewer::show
void show() override
Starts the event loop and display of elements.
Definition
PolyscopeViewer.h:68
DGtal::Trace::info
std::ostream & info()
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::trace
Trace trace
std
STL namespace.
main
int main()
Definition
testBits.cpp:56
examples
io
meshFromOFF.cpp
Generated on Tue Aug 26 2025 14:27:42 for DGtal by
1.9.8