DGtal 1.4.2
Loading...
Searching...
No Matches
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)
35#define MeshReader_RECURSES
36
37#if !defined MeshReader_h
39#define MeshReader_h
40
42// Inclusions
43#include <iostream>
44#include <map>
45#include <string>
46#include <DGtal/kernel/SpaceND.h>
47#include "DGtal/base/Common.h"
48#include "DGtal/shapes/Mesh.h"
49
51
52namespace DGtal
53{
54
55
56
58// class MeshReader
97 template <typename TPoint>
99{
100 // ----------------------- Standard services ------------------------------
101public:
102
103
114 static bool importOFFFile(const std::string & filename,
115 DGtal::Mesh<TPoint> & aMesh, bool invertVertexOrder=false,
116 bool onlyFaceVertex=false);
117
118
119
120
131 static bool importOFSFile(const std::string & filename,
132 DGtal::Mesh<TPoint> & aMesh, bool invertVertexOrder=false, double scale=1.0);
133
143 static
144 bool importOBJFile(const std::string & filename, DGtal::Mesh<TPoint> & aMesh, bool onlyFaceVertex=false );
145
146
150 static
151 bool verifyIndicesUniqueness( const std::vector<
152 typename DGtal::Mesh<TPoint>::Index > &indices );
153
154
162 static
163 std::map<std::string, DGtal::Color> readMaterial( std::istream & input);
164
165
166
167}; // end of class MeshReader
168
169
170
171
172
173
180 template <typename TPoint>
181 bool
182 operator<< ( Mesh<TPoint> & mesh, const std::string &filename );
183
184
185
186
187}// namespace DGtal
188
189
190
192// Includes inline functions.
193#include "DGtal/io/readers/MeshReader.ih"
194
195
196// //
198
199#endif // !defined MeshReader_h
200
201#undef MeshReader_RECURSES
202#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:92
VertexStorage::size_type Index
Definition Mesh.h:120
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
Aim: Defined to import OFF and OFS surface mesh. It allows to import a Mesh object and takes into acc...
Definition MeshReader.h:99
static bool importOFSFile(const std::string &filename, DGtal::Mesh< TPoint > &aMesh, bool invertVertexOrder=false, double scale=1.0)
static std::map< std::string, DGtal::Color > readMaterial(std::istream &input)
static bool importOFFFile(const std::string &filename, DGtal::Mesh< TPoint > &aMesh, bool invertVertexOrder=false, bool onlyFaceVertex=false)
static bool importOBJFile(const std::string &filename, DGtal::Mesh< TPoint > &aMesh, bool onlyFaceVertex=false)
static bool verifyIndicesUniqueness(const std::vector< typename DGtal::Mesh< TPoint >::Index > &indices)