DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
MeshReader.h
1
16
17
#pragma once
18
30
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
52
namespace
DGtal
53
{
54
55
56
58
// class MeshReader
91
92
93
94
95
template
<
typename
TPo
int
>
96
struct
MeshReader
97
{
98
// ----------------------- Standard services ------------------------------
99
public
:
100
101
111
112
static
bool
importOFFFile
(
const
std::string & filename,
113
DGtal::Mesh<TPoint>
& aMesh,
bool
invertVertexOrder=
false
,
114
bool
onlyFaceVertex=
false
);
115
116
117
118
128
129
static
bool
importOFSFile
(
const
std::string & filename,
130
DGtal::Mesh<TPoint>
& aMesh,
bool
invertVertexOrder=
false
,
double
scale
=1.0);
131
141
static
142
bool
importOBJFile
(
const
std::string & filename,
DGtal::Mesh<TPoint>
& aMesh,
bool
onlyFaceVertex=
false
);
143
144
148
static
149
bool
verifyIndicesUniqueness
(
const
std::vector<
150
typename
DGtal::Mesh<TPoint>::Index
> &indices );
151
152
160
static
161
std::map<std::string, DGtal::Color>
readMaterial
( std::istream & input);
162
163
164
165
};
// end of class MeshReader
166
167
168
169
170
171
178
template
<
typename
TPo
int
>
179
bool
180
operator<<
(
Mesh<TPoint>
& mesh,
const
std::string &filename );
181
182
183
184
185
}
// namespace DGtal
186
187
188
190
// Includes inline functions.
191
#include "DGtal/io/readers/MeshReader.ih"
192
193
194
// //
196
197
#endif
// !defined MeshReader_h
198
199
#undef MeshReader_RECURSES
200
#endif
// else defined(MeshReader_RECURSES)
DGtal::Mesh
Aim: This class is defined to represent a surface mesh through a set of vertices and faces....
Definition
Mesh.h:92
DGtal::Mesh::Index
VertexStorage::size_type Index
Definition
Mesh.h:120
scale
float scale
Definition
dgtalCalculus-bunny.cpp:59
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
DGtal::MeshReader
Aim: Defined to import OFF and OFS surface mesh. It allows to import a Mesh object and takes into acc...
Definition
MeshReader.h:97
DGtal::MeshReader::importOFSFile
static bool importOFSFile(const std::string &filename, DGtal::Mesh< TPoint > &aMesh, bool invertVertexOrder=false, double scale=1.0)
DGtal::MeshReader::readMaterial
static std::map< std::string, DGtal::Color > readMaterial(std::istream &input)
DGtal::MeshReader::importOFFFile
static bool importOFFFile(const std::string &filename, DGtal::Mesh< TPoint > &aMesh, bool invertVertexOrder=false, bool onlyFaceVertex=false)
DGtal::MeshReader::importOBJFile
static bool importOBJFile(const std::string &filename, DGtal::Mesh< TPoint > &aMesh, bool onlyFaceVertex=false)
DGtal::MeshReader::verifyIndicesUniqueness
static bool verifyIndicesUniqueness(const std::vector< typename DGtal::Mesh< TPoint >::Index > &indices)
src
DGtal
io
readers
MeshReader.h
Generated on
for DGtal by
1.18.0