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

#include <mesh_info.h>

Classes

struct  VertexInfo
 Per-vertex classification and adjacency information. More...
 

Public Types

typedef std::vector< std::size_t > AdjacentFaces
 
typedef std::vector< std::size_t > AdjacentVertices
 
enum  VertexClass { VERTEX_CLASS_SIMPLE , VERTEX_CLASS_BORDER , VERTEX_CLASS_COMPLEX , VERTEX_CLASS_UNREF }
 Vertex classification according to adjacent triangles. More...
 

Public Member Functions

 MeshInfo (TriangleMesh::ConstPtr mesh)
 Constructor with initialization for the given mesh.
 
 MeshInfo (void)
 Constructor without initialization.
 
VertexInfoat (std::size_t id)
 
VertexInfo const & at (std::size_t id) const
 
void clear (void)
 
void get_faces_for_edge (std::size_t v1, std::size_t v2, std::vector< std::size_t > *adjacent_faces) const
 Returns faces adjacent to both vertices.
 
void initialize (TriangleMesh::ConstPtr mesh)
 Initializes the data structure for the given mesh.
 
bool is_mesh_edge (std::size_t v1, std::size_t v2) const
 Checks for the existence of an edge between the given vertices.
 
VertexInfooperator[] (std::size_t id)
 
VertexInfo const & operator[] (std::size_t id) const
 
std::size_t size (void) const
 
void update_vertex (TriangleMesh const &mesh, std::size_t vertex_id)
 Updates the vertex info for a single vertex.
 

Detailed Description

Definition at line 22 of file mesh_info.h.

Member Typedef Documentation

◆ AdjacentFaces

typedef std::vector<std::size_t> mve::MeshInfo::AdjacentFaces

Definition at line 39 of file mesh_info.h.

◆ AdjacentVertices

typedef std::vector<std::size_t> mve::MeshInfo::AdjacentVertices

Definition at line 38 of file mesh_info.h.

Member Enumeration Documentation

◆ VertexClass

Vertex classification according to adjacent triangles.

Enumerator
VERTEX_CLASS_SIMPLE 

Vertex with a single closed fan of adjacent triangles.

VERTEX_CLASS_BORDER 

Vertex with a single but open fan of triangles.

VERTEX_CLASS_COMPLEX 

Vertex with more than one triangle fan.

VERTEX_CLASS_UNREF 

Vertiex without any adjacent triangles.

Definition at line 26 of file mesh_info.h.

Constructor & Destructor Documentation

◆ MeshInfo() [1/2]

mve::MeshInfo::MeshInfo ( void  )
inline

Constructor without initialization.

Definition at line 93 of file mesh_info.h.

◆ MeshInfo() [2/2]

mve::MeshInfo::MeshInfo ( TriangleMesh::ConstPtr  mesh)
inline

Constructor with initialization for the given mesh.

Definition at line 98 of file mesh_info.h.

Member Function Documentation

◆ at() [1/2]

MeshInfo::VertexInfo & mve::MeshInfo::at ( std::size_t  id)
inline

Definition at line 116 of file mesh_info.h.

◆ at() [2/2]

MeshInfo::VertexInfo const & mve::MeshInfo::at ( std::size_t  id) const
inline

Definition at line 122 of file mesh_info.h.

◆ clear()

void mve::MeshInfo::clear ( void  )
inline

Definition at line 134 of file mesh_info.h.

◆ get_faces_for_edge()

void mve::MeshInfo::get_faces_for_edge ( std::size_t  v1,
std::size_t  v2,
std::vector< std::size_t > *  adjacent_faces 
) const

Returns faces adjacent to both vertices.

Definition at line 172 of file mesh_info.cc.

◆ initialize()

void mve::MeshInfo::initialize ( TriangleMesh::ConstPtr  mesh)

Initializes the data structure for the given mesh.

Definition at line 19 of file mesh_info.cc.

◆ is_mesh_edge()

bool mve::MeshInfo::is_mesh_edge ( std::size_t  v1,
std::size_t  v2 
) const

Checks for the existence of an edge between the given vertices.

Definition at line 163 of file mesh_info.cc.

◆ operator[]() [1/2]

MeshInfo::VertexInfo & mve::MeshInfo::operator[] ( std::size_t  id)
inline

Definition at line 104 of file mesh_info.h.

◆ operator[]() [2/2]

MeshInfo::VertexInfo const & mve::MeshInfo::operator[] ( std::size_t  id) const
inline

Definition at line 110 of file mesh_info.h.

◆ size()

std::size_t mve::MeshInfo::size ( void  ) const
inline

Definition at line 128 of file mesh_info.h.

◆ update_vertex()

void mve::MeshInfo::update_vertex ( TriangleMesh const &  mesh,
std::size_t  vertex_id 
)

Updates the vertex info for a single vertex.

It expects that the list of adjacent faces is complete (but unorderd), and recomputes adjacent face ordering, adjacent vertices and the vertex class.

Definition at line 56 of file mesh_info.cc.


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