OMToolkit 1.0 The polygonal mesh processing tool.

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

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
OMToolkit::OMCurvature< Mesh, Scalar > Class Template Reference

`#include <OMCurvature.h>`

## Public Member Functions
| OMCurvature (Mesh *mesh, OpenMesh::VPropHandleT< Normal > &curvVectorHandle, OpenMesh::VPropHandleT< Scalar > &curvMagHandle)
bool | calcMeanCurvature ()
bool | calcGaussCurvature ()
bool | calcMinCurvature ()
bool | calcMaxCurvature ()

## Protected Types
typedef Mesh::Normal | Normal
typedef Mesh::VertexHandle | VertexHandle
typedef Mesh::FaceHandle | FaceHandle
typedef Mesh::HalfedgeHandle | HalfedgeHandle
typedef Eigen::Matrix< Scalar, 3, 3 > | Matrix3x3
typedef Eigen::Matrix< Scalar, 2, 2 > | Matrix2x2
typedef Eigen::Matrix< Scalar, 1, 3 > | RowVector3
typedef Eigen::Matrix< Scalar, 1, 2 > | RowVector2
typedef Eigen::Matrix< Scalar, 3, 1 > | ColumnVector3
typedef Eigen::Matrix< Scalar, 3, 1 > | ColumnVector2
typedef OpenMesh::VectorT < Scalar, 3 > | AreasVector

## Protected Member Functions
void | getCurvatureDirections (VertexHandle vertex, Normal &max, Normal &min)
Scalar | getVoronoiArea (VertexHandle vertex)
Normal | getMeanOperator (VertexHandle vertex)
Scalar | getGaussOperator (VertexHandle vertex)
Scalar | getVoronoiAreaTri (FaceHandle face, VertexHandle vertex)
Scalar | getVoronoiAreaTriO (FaceHandle face, VertexHandle vertex)
bool | isObtuse (FaceHandle face, HalfedgeHandle &half_edge)

## Protected Attributes
Mesh * | m_mesh
OpenMesh::VPropHandleT< Normal > | m_curvVectorHandle
OpenMesh::VPropHandleT< Scalar > | m_curvMagHandle
OpenMesh::FPropHandleT < AreasVector > | m_areas

## Detailed Description

### template<class Mesh, class Scalar>
class OMToolkit::OMCurvature< Mesh, Scalar >

Class computes curvatures on a mesh

Template Parameters

  Mesh | Mesh type to work with
  Scalar | type of computed curvature

## Member Typedef Documentation

template<class Mesh, class Scalar>

typedef OpenMesh::VectorT<Scalar, 3> OMToolkit::OMCurvature< Mesh, Scalar >::AreasVector
| protected

Precomputed voronoi area vector for each face

template<class Mesh, class Scalar>

typedef Eigen::Matrix<Scalar, 3, 1> OMToolkit::OMCurvature< Mesh, Scalar >::ColumnVector2
| protected

Eigen column vector 2D

template<class Mesh, class Scalar>

typedef Eigen::Matrix<Scalar, 3, 1> OMToolkit::OMCurvature< Mesh, Scalar >::ColumnVector3
| protected

Eigen column vector 3D

template<class Mesh, class Scalar>

typedef Mesh::FaceHandle OMToolkit::OMCurvature< Mesh, Scalar >::FaceHandle
| protected

Mesh face handle type

template<class Mesh, class Scalar>

typedef Mesh::HalfedgeHandle OMToolkit::OMCurvature< Mesh, Scalar >::HalfedgeHandle
| protected

Mesh halfedge handle type

template<class Mesh, class Scalar>

typedef Eigen::Matrix<Scalar, 2, 2> OMToolkit::OMCurvature< Mesh, Scalar >::Matrix2x2
| protected

Eigen matrix 2x2

template<class Mesh, class Scalar>

typedef Eigen::Matrix<Scalar, 3, 3> OMToolkit::OMCurvature< Mesh, Scalar >::Matrix3x3
| protected

Eigen matrix 3x3

template<class Mesh, class Scalar>

typedef Mesh::Normal OMToolkit::OMCurvature< Mesh, Scalar >::Normal
| protected

Mesh vector type

template<class Mesh, class Scalar>

typedef Eigen::Matrix<Scalar, 1, 2> OMToolkit::OMCurvature< Mesh, Scalar >::RowVector2
| protected

Eigen row vector 2D

template<class Mesh, class Scalar>

typedef Eigen::Matrix<Scalar, 1, 3> OMToolkit::OMCurvature< Mesh, Scalar >::RowVector3
| protected

Eigen row vector 3D

template<class Mesh, class Scalar>

typedef Mesh::VertexHandle OMToolkit::OMCurvature< Mesh, Scalar >::VertexHandle
| protected

Mesh vertex handle type

## Constructor & Destructor Documentation

template<class Mesh, class Scalar>

OMCurvature::OMCurvature | ( | Mesh * | mesh,
|  | OpenMesh::VPropHandleT< Normal > & | curvVectorHandle,
|  | OpenMesh::VPropHandleT< Scalar > & | curvMagHandle
| ) |  |

Constructor - create an instance of this class

Parameters

  mesh | Mesh to work with
  curvVectorHandle | Handle to a curvature direction vertex property
  curvMagHandle | Handle to a curvature magnitude vertex property

## Member Function Documentation

template<class Mesh, class Scalar>

bool OMCurvature::calcGaussCurvature | ( |  | ) |

Calculates Gauss curvature and for all mesh vertices

Returns
  True, if calculated successfully

template<class Mesh, class Scalar>

bool OMCurvature::calcMaxCurvature | ( |  | ) |

Calculates maximal curvature and for all mesh vertices

Returns
  True, if calculated successfully

Todo:
  Need to implement directions

template<class Mesh, class Scalar>

bool OMCurvature::calcMeanCurvature | ( |  | ) |

Calculates mean curvature and its direction for all mesh vertices

Returns
  True, if calculated successfully

template<class Mesh, class Scalar>

bool OMCurvature::calcMinCurvature | ( |  | ) |

Calculates minimal curvature and for all mesh vertices

Returns
  True, if calculated successfully

Todo:
  Need to implement directions

template<class Mesh, class Scalar>

void OMCurvature::getCurvatureDirections | ( | VertexHandle | vertex,
|  | Normal & | max,
|  | Normal & | min
| ) |  |
| protected

Function returns principal curvature directions for specified vertex Computation from paper of Gabriel Taubin - Estimating the tenspr of curvature of a surface from a polyhedral approximation

Parameters

  vertex | Vertex handle
  max | maximum curvature direction vector
  min | minimum curvature direction vector

template<class Mesh, class Scalar>

Scalar OMCurvature::getGaussOperator | ( | VertexHandle | vertex | ) |
| protected

Computes Gauss curvature value for specified vertex

Parameters

  vertex | Vertex handle

Returns
  Gauss curvature magnitude

template<class Mesh, class Scalar>

OMCurvature< Mesh, Scalar >::Normal OMCurvature::getMeanOperator | ( | VertexHandle | vertex | ) |
| protected

Computes mean curvature operator (vector, which direction equals mean curvature direction, its norm equals 2*mean curvature) for specified vertex

Parameters

  vertex | Vertex handle

Returns
  mean curvature operator

template<class Mesh, class Scalar>

Scalar OMCurvature::getVoronoiArea | ( | VertexHandle | vertex | ) |
| protected

Returns area of voronoi region aroun specified vertex

Parameters

  vertex | Vertex handle

Returns
  area of voronoi region

template<class Mesh, class Scalar>

Scalar OMCurvature::getVoronoiAreaTri | ( | FaceHandle | face,
|  | VertexHandle | vertex
| ) |  |
| protected

Computes voronoi area of non-obtuse triangle from given vertex

Parameters

  face | Given triangle
  face | Vertex handle

Returns
  Area of voronoi region

template<class Mesh, class Scalar>

Scalar OMCurvature::getVoronoiAreaTriO | ( | FaceHandle | face,
|  | VertexHandle | vertex
| ) |  |
| protected

Computes voronoi area of obtuse triangle from given vertex

Parameters

  face | Given triangle
  face | Vertex handle

Returns
  Area of voronoi region

template<class Mesh, class Scalar>

bool OMCurvature::isObtuse | ( | FaceHandle | face,
|  | HalfedgeHandle & | half_edge
| ) |  |
| protected

Predicate, is triangle obtuse? (Is one of its angles obtuse?)

Parameters

  face | Specified triangle
  half_edge | Half edge handle pointing on found obtuse angle (if not obtuse, it is not specified)

Returns
  true, if triangle has an obtuse angle

## Member Data Documentation

template<class Mesh, class Scalar>

OpenMesh::FPropHandleT<AreasVector> OMToolkit::OMCurvature< Mesh, Scalar >::m_areas
| protected

Precomputed voronoi area property handle

template<class Mesh, class Scalar>

OpenMesh::VPropHandleT<Scalar> OMToolkit::OMCurvature< Mesh, Scalar >::m_curvMagHandle
| protected

Curvature magnitude property handle

template<class Mesh, class Scalar>

OpenMesh::VPropHandleT<Normal> OMToolkit::OMCurvature< Mesh, Scalar >::m_curvVectorHandle
| protected

Curvature direction property handle

template<class Mesh, class Scalar>

Mesh* OMToolkit::OMCurvature< Mesh, Scalar >::m_mesh
| protected

Intern pointer to a mesh

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

- trunk/include/OMToolkit/OMCurvature.h
- trunk/include/OMToolkit/OMCurvature.hxx