10#ifndef MVE_TRIANGLE_MESH_HEADER
11#define MVE_TRIANGLE_MESH_HEADER
29 typedef std::shared_ptr<MeshBase>
Ptr;
30 typedef std::shared_ptr<MeshBase const>
ConstPtr;
47 ColorList const& get_vertex_colors (
void)
const;
57 ValueList const& get_vertex_values (
void)
const;
62 bool has_vertex_colors (
void)
const;
64 bool has_vertex_confidences (
void)
const;
66 bool has_vertex_values (
void)
const;
69 virtual void clear (
void);
92 typedef std::shared_ptr<TriangleMesh>
Ptr;
93 typedef std::shared_ptr<TriangleMesh const>
ConstPtr;
103 static Ptr create (
void);
106 Ptr duplicate (
void)
const;
109 NormalList const& get_vertex_normals (
void)
const;
119 FaceList const& get_faces (
void)
const;
124 NormalList const& get_face_normals (
void)
const;
129 ColorList const& get_face_colors (
void)
const;
134 bool has_vertex_normals (
void)
const;
136 bool has_vertex_texcoords (
void)
const;
138 bool has_face_normals (
void)
const;
140 bool has_face_colors (
void)
const;
143 void ensure_normals (
bool face =
true,
bool vertex =
true);
145 void recalc_normals (
bool face =
true,
bool vertex =
true);
148 virtual void clear (
void);
150 void clear_normals (
void);
156 void delete_vertices (
DeleteList const& dlist);
162 void delete_vertices_fix_faces (
DeleteList const& dlist);
168 void delete_invalid_faces (
void);
171 std::size_t get_byte_size (
void)
const;
189MeshBase::MeshBase (
void)
194MeshBase::~MeshBase (
void)
199MeshBase::get_vertices (
void)
const
201 return this->vertices;
205MeshBase::get_vertices (
void)
207 return this->vertices;
211MeshBase::get_vertex_colors (
void)
const
213 return this->vertex_colors;
217MeshBase::get_vertex_colors (
void)
219 return this->vertex_colors;
223MeshBase::get_vertex_confidences (
void)
const
225 return this->vertex_confidences;
229MeshBase::get_vertex_confidences (
void)
231 return this->vertex_confidences;
235MeshBase::get_vertex_values (
void)
const
237 return this->vertex_values;
241MeshBase::get_vertex_values (
void)
243 return this->vertex_values;
247MeshBase::clear (
void)
249 this->vertices.clear();
250 this->vertex_colors.clear();
251 this->vertex_confidences.clear();
252 this->vertex_values.clear();
256MeshBase::has_vertex_colors (
void)
const
258 return !this->vertices.empty()
259 && this->vertex_colors.size() == this->vertices.size();
263MeshBase::has_vertex_confidences (
void)
const
265 return !this->vertices.empty()
266 && this->vertex_confidences.size() == this->vertices.size();
270MeshBase::has_vertex_values (
void)
const
272 return !this->vertices.empty()
273 && this->vertex_values.size() == this->vertices.size();
279TriangleMesh::duplicate (
void)
const
285TriangleMesh::TriangleMesh (
void)
290TriangleMesh::~TriangleMesh (
void)
295TriangleMesh::create (
void)
307TriangleMesh::get_vertex_normals (
void)
const
309 return this->vertex_normals;
313TriangleMesh::get_vertex_normals (
void)
315 return this->vertex_normals;
319TriangleMesh::get_vertex_texcoords (
void)
const
321 return this->vertex_texcoords;
325TriangleMesh::get_vertex_texcoords (
void)
327 return this->vertex_texcoords;
331TriangleMesh::get_faces (
void)
const
337TriangleMesh::get_faces (
void)
343TriangleMesh::get_face_normals (
void)
const
345 return this->face_normals;
349TriangleMesh::get_face_normals (
void)
351 return this->face_normals;
355TriangleMesh::get_face_colors (
void)
357 return this->face_colors;
361TriangleMesh::get_face_colors (
void)
const
363 return this->face_colors;
367TriangleMesh::clear_normals (
void)
369 this->vertex_normals.clear();
370 this->face_normals.clear();
374TriangleMesh::clear (
void)
376 this->MeshBase::clear();
377 this->vertex_normals.clear();
378 this->vertex_texcoords.clear();
380 this->face_normals.clear();
381 this->face_colors.clear();
385TriangleMesh::has_vertex_normals (
void)
const
387 return !this->vertices.empty()
388 && this->vertex_normals.size() == this->vertices.size();
392TriangleMesh::has_vertex_texcoords (
void)
const
394 return !this->vertices.empty()
395 && this->vertex_texcoords.size() == this->vertices.size();
399TriangleMesh::has_face_normals (
void)
const
401 return !this->faces.empty()
402 && this->faces.size() == this->face_normals.size() * 3;
406TriangleMesh::has_face_colors (
void)
const
408 return !this->faces.empty()
409 && this->faces.size() == this->face_colors.size() * 3;
std::vector< math::Vec3f > VertexList
ConfidenceList vertex_confidences
std::shared_ptr< MeshBase > Ptr
std::shared_ptr< MeshBase const > ConstPtr
std::vector< float > ConfidenceList
std::vector< math::Vec4f > ColorList
std::vector< float > ValueList
Triangle mesh representation.
std::vector< math::Vec3f > NormalList
std::vector< bool > DeleteList
TexCoordList vertex_texcoords
std::vector< math::Vec2f > TexCoordList
std::shared_ptr< TriangleMesh > Ptr
std::vector< VertexID > FaceList
std::shared_ptr< TriangleMesh const > ConstPtr
NormalList vertex_normals
#define MVE_NAMESPACE_BEGIN
#define MVE_NAMESPACE_END