Loading [MathJax]/extensions/MathMenu.js
DGtal 2.0.0
meshFromOFF.cpp File Reference
#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"
Include dependency graph for meshFromOFF.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Detailed Description

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Author
Bertrand Kerautret (kerau.nosp@m.tre@.nosp@m.loria.nosp@m..fr ) LORIA (CNRS, UMR 7503), University of Nancy, France
Date
2012/07/05

An example file named meshFromOFF.

This file is part of the DGtal library.

Definition in file meshFromOFF.cpp.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

[ImportOFFfile]

[displayOFFfile]

[displayOFFfile] [ImportOFFfile]

Definition at line 60 of file meshFromOFF.cpp.

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}
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.
Trace trace

References DGtal::PolyscopeViewer< Space, KSpace >::show(), and DGtal::trace.