MVE - Multi-View Environment mve-devel
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
mve::TriangleMesh Class Reference

Triangle mesh representation. More...

#include <mesh.h>

Collaboration diagram for mve::TriangleMesh:
Collaboration graph
[legend]

Public Types

typedef std::shared_ptr< TriangleMesh const > ConstPtr
 
typedef std::vector< bool > DeleteList
 
typedef std::vector< VertexIDFaceList
 
typedef std::vector< math::Vec3fNormalList
 
typedef std::shared_ptr< TriangleMeshPtr
 
typedef std::vector< math::Vec2fTexCoordList
 
- Public Types inherited from mve::MeshBase
typedef std::vector< math::Vec4fColorList
 
typedef std::vector< float > ConfidenceList
 
typedef std::shared_ptr< MeshBase const > ConstPtr
 
typedef std::shared_ptr< MeshBasePtr
 
typedef std::vector< float > ValueList
 
typedef unsigned int VertexID
 
typedef std::vector< math::Vec3fVertexList
 

Public Member Functions

virtual ~TriangleMesh (void)
 
virtual void clear (void)
 Clears all mesh data.
 
void clear_normals (void)
 Clears mesh normal data.
 
void delete_invalid_faces (void)
 Deletes all invalid triangles, i.e.
 
void delete_vertices (DeleteList const &dlist)
 Deletes marked vertices and related attributes if available.
 
void delete_vertices_fix_faces (DeleteList const &dlist)
 
Ptr duplicate (void) const
 
void ensure_normals (bool face=true, bool vertex=true)
 Recalculates normals if normal amount is inconsistent.
 
std::size_t get_byte_size (void) const
 Returns the memory consumption in bytes.
 
ColorListget_face_colors (void)
 Returns the face colors.
 
ColorList const & get_face_colors (void) const
 Returns the face colors.
 
NormalListget_face_normals (void)
 Returns the face normals.
 
NormalList const & get_face_normals (void) const
 Returns the face normals.
 
FaceListget_faces (void)
 Returns the triangle indices.
 
FaceList const & get_faces (void) const
 Returns the triangle indices.
 
NormalListget_vertex_normals (void)
 Returns the vertex normals.
 
NormalList const & get_vertex_normals (void) const
 Returns the vertex normals.
 
TexCoordListget_vertex_texcoords (void)
 Returns the vectex texture coordinates.
 
TexCoordList const & get_vertex_texcoords (void) const
 Returns the vectex texture coordinates.
 
bool has_face_colors (void) const
 Returns true if face color amount equals face amount.
 
bool has_face_normals (void) const
 Returns true if face normal amount equals face amount.
 
bool has_vertex_normals (void) const
 Returns true if vertex normal amount equals vertex amount.
 
bool has_vertex_texcoords (void) const
 Returns true if texture coordinate amount equals vertex amount.
 
void recalc_normals (bool face=true, bool vertex=true)
 Recalculates face and/or vertex normals.
 
- Public Member Functions inherited from mve::MeshBase
virtual ~MeshBase (void)
 
ColorListget_vertex_colors (void)
 Returns the vertex colors.
 
ColorList const & get_vertex_colors (void) const
 Returns the vertex colors.
 
ConfidenceListget_vertex_confidences (void)
 Returns the vertex confidences.
 
ConfidenceList const & get_vertex_confidences (void) const
 Returns the vertex confidences.
 
ValueListget_vertex_values (void)
 Returns the vertex values (generic attribute).
 
ValueList const & get_vertex_values (void) const
 Returns the vertex values (generic attribute).
 
VertexListget_vertices (void)
 Returns the mesh vertices.
 
VertexList const & get_vertices (void) const
 Returns the mesh vertices.
 
bool has_vertex_colors (void) const
 Returns true if colors and vertex amount are equal.
 
bool has_vertex_confidences (void) const
 Returns true if confidence amount and vertex amount are equal.
 
bool has_vertex_values (void) const
 Returns true if value amount and vertex amount are equal.
 

Static Public Member Functions

static Ptr create (TriangleMesh::ConstPtr other)
 
static Ptr create (void)
 

Protected Member Functions

 TriangleMesh (void)
 Use the create() methods to instantiate a mesh.
 
- Protected Member Functions inherited from mve::MeshBase
 MeshBase (void)
 

Protected Attributes

ColorList face_colors
 
NormalList face_normals
 
FaceList faces
 
NormalList vertex_normals
 
TexCoordList vertex_texcoords
 
- Protected Attributes inherited from mve::MeshBase
ColorList vertex_colors
 
ConfidenceList vertex_confidences
 
ValueList vertex_values
 
VertexList vertices
 

Detailed Description

Triangle mesh representation.

The triangle mesh holds a list of vertices, per-vertex normals, colors, and confidences, a list of vertex indices for the faces and per-face normals.

Definition at line 89 of file mesh.h.

Member Typedef Documentation

◆ ConstPtr

typedef std::shared_ptr<TriangleMesh const> mve::TriangleMesh::ConstPtr

Definition at line 93 of file mesh.h.

◆ DeleteList

typedef std::vector<bool> mve::TriangleMesh::DeleteList

Definition at line 99 of file mesh.h.

◆ FaceList

typedef std::vector<VertexID> mve::TriangleMesh::FaceList

Definition at line 97 of file mesh.h.

◆ NormalList

Definition at line 95 of file mesh.h.

◆ Ptr

typedef std::shared_ptr<TriangleMesh> mve::TriangleMesh::Ptr

Definition at line 92 of file mesh.h.

◆ TexCoordList

Definition at line 96 of file mesh.h.

Constructor & Destructor Documentation

◆ ~TriangleMesh()

mve::TriangleMesh::~TriangleMesh ( void  )
inlinevirtual

Definition at line 290 of file mesh.h.

◆ TriangleMesh()

mve::TriangleMesh::TriangleMesh ( void  )
inlineprotected

Use the create() methods to instantiate a mesh.

Definition at line 285 of file mesh.h.

Member Function Documentation

◆ clear()

void mve::TriangleMesh::clear ( void  )
inlinevirtual

Clears all mesh data.

Reimplemented from mve::MeshBase.

Definition at line 374 of file mesh.h.

◆ clear_normals()

void mve::TriangleMesh::clear_normals ( void  )
inline

Clears mesh normal data.

Definition at line 367 of file mesh.h.

◆ create() [1/2]

TriangleMesh::Ptr mve::TriangleMesh::create ( TriangleMesh::ConstPtr  other)
inlinestatic

Definition at line 301 of file mesh.h.

◆ create() [2/2]

TriangleMesh::Ptr mve::TriangleMesh::create ( void  )
inlinestatic

Definition at line 295 of file mesh.h.

◆ delete_invalid_faces()

void mve::TriangleMesh::delete_invalid_faces ( void  )

Deletes all invalid triangles, i.e.

the triangles where all three vertices have the same vertex ID.

Definition at line 248 of file mesh.cc.

◆ delete_vertices()

void mve::TriangleMesh::delete_vertices ( DeleteList const &  dlist)

Deletes marked vertices and related attributes if available.

Note that this does not change face data.

Definition at line 178 of file mesh.cc.

◆ delete_vertices_fix_faces()

void mve::TriangleMesh::delete_vertices_fix_faces ( DeleteList const &  dlist)

Definition at line 199 of file mesh.cc.

◆ duplicate()

TriangleMesh::Ptr mve::TriangleMesh::duplicate ( void  ) const
inline

Definition at line 279 of file mesh.h.

◆ ensure_normals()

void mve::TriangleMesh::ensure_normals ( bool  face = true,
bool  vertex = true 
)

Recalculates normals if normal amount is inconsistent.

Definition at line 166 of file mesh.cc.

◆ get_byte_size()

std::size_t mve::TriangleMesh::get_byte_size ( void  ) const

Returns the memory consumption in bytes.

Definition at line 275 of file mesh.cc.

◆ get_face_colors() [1/2]

TriangleMesh::ColorList & mve::TriangleMesh::get_face_colors ( void  )
inline

Returns the face colors.

Definition at line 355 of file mesh.h.

◆ get_face_colors() [2/2]

TriangleMesh::ColorList const & mve::TriangleMesh::get_face_colors ( void  ) const
inline

Returns the face colors.

Definition at line 361 of file mesh.h.

◆ get_face_normals() [1/2]

TriangleMesh::NormalList & mve::TriangleMesh::get_face_normals ( void  )
inline

Returns the face normals.

Definition at line 349 of file mesh.h.

◆ get_face_normals() [2/2]

TriangleMesh::NormalList const & mve::TriangleMesh::get_face_normals ( void  ) const
inline

Returns the face normals.

Definition at line 343 of file mesh.h.

◆ get_faces() [1/2]

TriangleMesh::FaceList & mve::TriangleMesh::get_faces ( void  )
inline

Returns the triangle indices.

Definition at line 337 of file mesh.h.

◆ get_faces() [2/2]

TriangleMesh::FaceList const & mve::TriangleMesh::get_faces ( void  ) const
inline

Returns the triangle indices.

Definition at line 331 of file mesh.h.

◆ get_vertex_normals() [1/2]

TriangleMesh::NormalList & mve::TriangleMesh::get_vertex_normals ( void  )
inline

Returns the vertex normals.

Definition at line 313 of file mesh.h.

◆ get_vertex_normals() [2/2]

TriangleMesh::NormalList const & mve::TriangleMesh::get_vertex_normals ( void  ) const
inline

Returns the vertex normals.

Definition at line 307 of file mesh.h.

◆ get_vertex_texcoords() [1/2]

TriangleMesh::TexCoordList & mve::TriangleMesh::get_vertex_texcoords ( void  )
inline

Returns the vectex texture coordinates.

Definition at line 325 of file mesh.h.

◆ get_vertex_texcoords() [2/2]

TriangleMesh::TexCoordList const & mve::TriangleMesh::get_vertex_texcoords ( void  ) const
inline

Returns the vectex texture coordinates.

Definition at line 319 of file mesh.h.

◆ has_face_colors()

bool mve::TriangleMesh::has_face_colors ( void  ) const
inline

Returns true if face color amount equals face amount.

Definition at line 406 of file mesh.h.

◆ has_face_normals()

bool mve::TriangleMesh::has_face_normals ( void  ) const
inline

Returns true if face normal amount equals face amount.

Definition at line 399 of file mesh.h.

◆ has_vertex_normals()

bool mve::TriangleMesh::has_vertex_normals ( void  ) const
inline

Returns true if vertex normal amount equals vertex amount.

Definition at line 385 of file mesh.h.

◆ has_vertex_texcoords()

bool mve::TriangleMesh::has_vertex_texcoords ( void  ) const
inline

Returns true if texture coordinate amount equals vertex amount.

Definition at line 392 of file mesh.h.

◆ recalc_normals()

void mve::TriangleMesh::recalc_normals ( bool  face = true,
bool  vertex = true 
)

Recalculates face and/or vertex normals.

Definition at line 25 of file mesh.cc.

Member Data Documentation

◆ face_colors

ColorList mve::TriangleMesh::face_colors
protected

Definition at line 179 of file mesh.h.

◆ face_normals

NormalList mve::TriangleMesh::face_normals
protected

Definition at line 178 of file mesh.h.

◆ faces

FaceList mve::TriangleMesh::faces
protected

Definition at line 177 of file mesh.h.

◆ vertex_normals

NormalList mve::TriangleMesh::vertex_normals
protected

Definition at line 174 of file mesh.h.

◆ vertex_texcoords

TexCoordList mve::TriangleMesh::vertex_texcoords
protected

Definition at line 175 of file mesh.h.


The documentation for this class was generated from the following files: