Developer Documentation

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Functions
MeshFunctions Namespace Reference

Namespace providing different Mesh editing functions. More...

## Functions
template<typename MeshT , typename VectorT >
bool | get_boundary (MeshT &_mesh, typename MeshT::VertexHandle _vh, std::vector< std::pair< VectorT, typename MeshT::VertexHandle > > &_boundary)
template<typename MeshT , typename VectorT >
bool | get_boundary (MeshT &_mesh, std::vector< std::pair< VectorT, typename MeshT::VertexHandle > > &_boundary)
template<typename MeshT , typename VectorT >
void | smooth_boundary (MeshT &_mesh, typename MeshT::VertexHandle _vh)
template<typename MeshT >
bool | neighbour (const MeshT &_mesh, const typename MeshT::FaceHandle _fh1, const typename MeshT::FaceHandle _fh2)
template<class MeshT , typename VectorT >
bool | cut_face (const VectorT &_porigin, const VectorT &_pnormal, const MeshT &_mesh, const typename MeshT::FaceHandle &_fh)
template<typename MeshT >
double | calc_area (const MeshT &_mesh)
template<typename MeshT >
double | calc_angle_around (const MeshT &_mesh, const typename MeshT::VertexHandle _vh)
template<typename MeshT >
void | transformMesh (ACG::Matrix4x4d _matrix, MeshT &_mesh)
template<typename MeshT >
void | transformHandleVertices (ACG::Matrix4x4d _matrix, MeshT &_mesh)

## Detailed Description

Namespace providing different Mesh editing functions.

## Function Documentation

template<typename MeshT >

double MeshFunctions::calc_angle_around | ( | const MeshT & | _mesh,
|  | const typename MeshT::VertexHandle | _vh
| ) |  |

Get the sum of the angles around a vertex

Parameters

  _mesh | Mesh to work on
  _vh | Vertex

Returns
  Sum of angles around the vertex

Definition at line 216 of file MeshFunctions.cc.

template<typename MeshT >

double MeshFunctions::calc_area | ( | const MeshT & | _mesh | ) |

Get the area of a mesh ( sum over all triangle areas)

Parameters

  _mesh | Mesh to calculate area

Returns
  Area spanned by the mesh

Definition at line 198 of file MeshFunctions.cc.

template<class MeshT , typename VectorT >

bool MeshFunctions::cut_face | ( | const VectorT & | _porigin,
|  | const VectorT & | _pnormal,
|  | const MeshT & | _mesh,
|  | const typename MeshT::FaceHandle & | _fh
| ) |  |

Checks if plane cuts the face

Parameters

  _porigin | Planes origin
  _pnormal | Plane normal
  _mesh | Mesh
  _fh | Facehandle of face

Returns
  triangle cut by plane?

Definition at line 175 of file MeshFunctions.cc.

template<typename MeshT , typename VectorT >

bool MeshFunctions::get_boundary | ( | MeshT & | _mesh,
|  | typename MeshT::VertexHandle | _vh,
|  | std::vector< std::pair< VectorT, typename MeshT::VertexHandle > > & | _boundary
| ) |  |

get one boundary at the vertex

Parameters

  _mesh | Mesh
  _vh | Vertex handle of one vertex of the boundary
  _boundary | Coords and vertex handles of the boundary

Definition at line 82 of file MeshFunctions.cc.

template<typename MeshT , typename VectorT >

bool MeshFunctions::get_boundary | ( | MeshT & | _mesh,
|  | std::vector< std::pair< VectorT, typename MeshT::VertexHandle > > & | _boundary
| ) |  |

get boundary of a mesh (assumes that there is only one boundary!!

Parameters

  _mesh | Mesh
  _boundary | Coords and vertex handles of the boundary

Returns
  Found a boundary?

Definition at line 121 of file MeshFunctions.cc.

template<typename MeshT >

bool MeshFunctions::neighbour | ( | const MeshT & | _mesh,
|  | const typename MeshT::FaceHandle | _fh1,
|  | const typename MeshT::FaceHandle | _fh2
| ) |  |

Checks for two faces if they are adjazent

Parameters

  _mesh | Mesh
  _fh1 | First Face
  _fh2 | Second Face

Definition at line 162 of file MeshFunctions.cc.

template<typename MeshT , typename VectorT >

void MeshFunctions::smooth_boundary | ( | MeshT & | _mesh,
|  | typename MeshT::VertexHandle | _vh
| ) |  |

function to smooth a boundary of a given mesh by moving each vertex to the mean Position of its adjazent verticies

Parameters

  _mesh | Mesh to work on
  _vh | Vertex handle on the boundary

Definition at line 145 of file MeshFunctions.cc.

template<typename MeshT >

void MeshFunctions::transformHandleVertices | ( | ACG::Matrix4x4d | _matrix,
|  | MeshT & | _mesh
| ) |  |

Transform handle vertices only

Parameters

  _matrix | The transformation matrix
  _mesh | The mesh that is to be transformed

Definition at line 275 of file MeshFunctions.cc.

template<typename MeshT >

void MeshFunctions::transformMesh | ( | ACG::Matrix4x4d | _matrix,
|  | MeshT & | _mesh
| ) |  |

Transform geometry of the mesh using the specified transformation matrix.

Parameters

  _matrix | The transformation matrix
  _mesh | The mesh that is to be transformed

Definition at line 237 of file MeshFunctions.cc.