DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
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/fromPoints/MeshFromPoints.h"
47 
49 
50 namespace DGtal
51 {
52 
53 
54 
56 // class OFFMesh
88  template <typename TPoint>
89 struct MeshReader
90 {
91  // ----------------------- Standard services ------------------------------
92 public:
93 
94 
104  static bool importOFFFile(const std::string & filename,
105  DGtal::MeshFromPoints<TPoint> & aMesh, bool invertVertexOrder=false) throw(DGtal::IOException);
106 
107 
108 
109 
120  static bool importOFSFile(const std::string & filename,
121  DGtal::MeshFromPoints<TPoint> & aMesh, bool invertVertexOrder=false, double scale=1.0) throw(DGtal::IOException);
122 
123 
124 
125 
126 
127 
128 
129 }; // end of class MeshReader
130 
131 
132 
133 
134 
135 
142  template <typename TPoint>
143  bool
144  operator<< ( MeshFromPoints<TPoint> & mesh, const std::string &filename );
145 
146 
147 
148 
149 }// namespace DGtal
150 
151 
152 
154 // Includes inline functions.
155 #include "DGtal/io/readers/MeshReader.ih"
156 
157 
158 // //
160 
161 #endif // !defined MeshReader_h
162 
163 #undef MeshReader_RECURSES
164 #endif // else defined(MeshReader_RECURSES)