DGtal  1.5.beta
meshFromOFF.cpp File Reference
#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"
Include dependency graph for meshFromOFF.cpp:

Go to the source code of this file.


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/.

Bertrand Kerautret (kerau.nosp@m.tre@.nosp@m.loria.nosp@m..fr ) LORIA (CNRS, UMR 7503), University of Nancy, France

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 





Definition at line 60 of file meshFromOFF.cpp.

61 {
62  QApplication application(argc,argv);
63  Viewer3D<> viewer;
64  viewer.show();
66  std::string inputFilename = examplesPath + "samples/tref.off";
67  // Since the input points are not necessary integers we use the PointD3D from Display3D.
68  Mesh<Viewer3D<>::RealPoint> anImportedMesh;
69  anImportedMesh << inputFilename;
71  trace.info()<< "importating done..."<< endl;
73  viewer.setLineColor(DGtal::Color(150,0,0,254));
74  viewer << anImportedMesh;
75  viewer << Viewer3D<>::updateDisplay;
77  return application.exec();
78 }
Structure representing an RGB triple with alpha component.
Definition: Color.h:68
virtual void setLineColor(DGtal::Color aColor)
Aim: This class is defined to represent a surface mesh through a set of vertices and faces....
Definition: Mesh.h:92
std::ostream & info()
virtual void show()
Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are w...
Trace trace
Definition: Common.h:153

References DGtal::Trace::info(), DGtal::Display3D< Space, KSpace >::setLineColor(), DGtal::Viewer3D< TSpace, TKSpace >::show(), and DGtal::trace.