DGtal  0.9.2
MeshReader.h
1 
17 #pragma once
18 
31 #if defined(MeshReader_RECURSES)
32 #error Recursive header files inclusion detected in MeshReader.h
33 #else // defined(MeshReader_RECURSES)
34 
35 #define MeshReader_RECURSES
36 
37 #if !defined MeshReader_h
38 
39 #define MeshReader_h
40 
42 // Inclusions
43 #include <iostream>
44 #include <DGtal/kernel/SpaceND.h>
45 #include "DGtal/base/Common.h"
46 #include "DGtal/shapes/Mesh.h"
47 
49 
50 namespace DGtal
51 {
52 
53 
54 
56 // class MeshReader
95  template <typename TPoint>
96 struct MeshReader
97 {
98  // ----------------------- Standard services ------------------------------
99 public:
100 
101 
111  static bool importOFFFile(const std::string & filename,
112  DGtal::Mesh<TPoint> & aMesh, bool invertVertexOrder=false) throw(DGtal::IOException);
113 
114 
115 
116 
127  static bool importOFSFile(const std::string & filename,
128  DGtal::Mesh<TPoint> & aMesh, bool invertVertexOrder=false, double scale=1.0) throw(DGtal::IOException);
129 
130 
131 
132 
133 
134 
135 
136 }; // end of class MeshReader
137 
138 
139 
140 
141 
142 
149  template <typename TPoint>
150  bool
151  operator<< ( Mesh<TPoint> & mesh, const std::string &filename );
152 
153 
154 
155 
156 }// namespace DGtal
157 
158 
159 
161 // Includes inline functions.
162 #include "DGtal/io/readers/MeshReader.ih"
163 
164 
165 // //
167 
168 #endif // !defined MeshReader_h
169 
170 #undef MeshReader_RECURSES
171 #endif // else defined(MeshReader_RECURSES)
Aim: This class is defined to represent a surface mesh through a set of vertices and faces...
Definition: Mesh.h:91
static bool importOFSFile(const std::string &filename, DGtal::Mesh< TPoint > &aMesh, bool invertVertexOrder=false, double scale=1.0)
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: Defined to import OFF and OFS surface mesh. It allows to import a Mesh object and takes into acc...
Definition: MeshReader.h:96
static bool importOFFFile(const std::string &filename, DGtal::Mesh< TPoint > &aMesh, bool invertVertexOrder=false)