Developer Documentation
MeshFixing< MeshT > Class Template Reference

Fix a mesh. More...

#include <Plugin-MeshRepair/MeshFixingT.hh>

Classes

struct  Face
 Internal face type. More...
 
struct  Vertex
 Internal vertex type. More...
 

Public Member Functions

 MeshFixing (MeshT &_mesh, double _epsilon)
 
bool fix ()
 

Private Types

typedef std::map< ACG::Vec3d, int, CompareVectorsVertexMap
 
typedef VertexMap::iterator MapIter
 

Private Member Functions

void add_face (const ACG::Vec3d &_p0, const ACG::Vec3d &_p1, const ACG::Vec3d &_p2)
 Add a face to the fixing data. More...
 
void fix_topology ()
 Fix the mesh topology. More...
 
void fix_orientation ()
 
int neighbor (unsigned int _f, unsigned int _v0, unsigned int _v1)
 
int add_vertex (const ACG::Vec3d &_p)
 

Private Attributes

TriMeshmesh_
 
std::vector< Vertexvertices_
 
std::vector< Facefaces_
 
VertexMap vmap_
 

Detailed Description

template<class MeshT>
class MeshFixing< MeshT >

Fix a mesh.

Definition at line 89 of file MeshFixingT.hh.

Member Function Documentation

◆ add_face()

template<class MeshT >
void MeshFixing< MeshT >::add_face ( const ACG::Vec3d _p0,
const ACG::Vec3d _p1,
const ACG::Vec3d _p2 
)
private

Add a face to the fixing data.

Degenerated faces will already be discarded in this step

Parameters
_p0Vertex 1
_p1Vertex 2
_p2Vertex 3

Definition at line 99 of file MeshFixingT_impl.hh.

◆ add_vertex()

template<class MeshT >
int MeshFixing< MeshT >::add_vertex ( const ACG::Vec3d _p)
private

Add a vertex to the map

Parameters
_pNew vertex
Returns
Index of the vertex

Definition at line 93 of file MeshFixingT_impl.hh.

◆ fix_orientation()

template<class MeshT >
void MeshFixing< MeshT >::fix_orientation ( )
private

Tries to ensure that all faces in one component have the same orientation.

Definition at line 308 of file MeshFixingT_impl.hh.

◆ fix_topology()

template<class MeshT >
void MeshFixing< MeshT >::fix_topology ( )
private

Fix the mesh topology.

Separates all components that are incident to the vertices by adding new vertices. Required to always get a manifold configuration

Definition at line 142 of file MeshFixingT_impl.hh.

◆ neighbor()

template<class MeshT >
int MeshFixing< MeshT >::neighbor ( unsigned int  _f,
unsigned int  _v0,
unsigned int  _v1 
)
private

Get the neighbor

Parameters
_fCurrent face
_v0Center vertex
_v1Test vertex
Returns

Definition at line 271 of file MeshFixingT_impl.hh.


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