vcg::tri::UpdateNormals< ComputeMeshType > Class Template Reference
[Trimesh]

Management, updating and computation of per-vertex and per-face normals. More...

#include <vcg/complex/trimesh/update/normal.h>

List of all members.

Public Types

typedef MeshType::CoordType CoordType
typedef MeshType::FaceIterator FaceIterator
typedef MeshType::FacePointer FacePointer
typedef MeshType::FaceType FaceType
typedef ComputeMeshType MeshType
typedef VertexType::NormalType NormalType
typedef VertexType::ScalarType ScalarType
typedef MeshType::VertexIterator VertexIterator
typedef MeshType::VertexPointer VertexPointer
typedef MeshType::VertexType VertexType

Static Public Member Functions

static void AreaNormalizeFace (ComputeMeshType &m)
static void NormalizeFace (ComputeMeshType &m)
 Normalize the lenght of the face normals.
static void NormalizeVertex (ComputeMeshType &m)
 Normalize the lenght of the face normals.
static void PerBitQuadFaceNormalized (ComputeMeshType &m)
static void PerFace (ComputeMeshType &m)
 Calculates the face normal (if stored in the current face type).
static void PerFaceFromCurrentVertexNormal (ComputeMeshType &m)
 Calculates the vertex normal. Exploiting or current face normals.
static void PerFaceMatrix (ComputeMeshType &m, const Matrix44< ScalarType > &mat, bool remove_scaling=true)
 Multiply the face normals by the matrix passed. By default, the scale component is removed.
static void PerFaceNormalized (ComputeMeshType &m)
static void PerFaceRW (ComputeMeshType &m, bool normalize=false)
static void PerVertex (ComputeMeshType &m)
 Calculates the vertex normal. Without exploiting or touching face normals.
static void PerVertexAngleWeighted (ComputeMeshType &m)
 Calculates the vertex normal. Without exploiting or touching face normals.
static void PerVertexFromCurrentFaceNormal (ComputeMeshType &m)
 Calculates the vertex normal. Exploiting or current face normals.
static void PerVertexMatrix (ComputeMeshType &m, const Matrix44< ScalarType > &mat, bool remove_scaling=true)
 Multiply the vertex normals by the matrix passed. By default, the scale component is removed.
static void PerVertexNormalized (ComputeMeshType &m)
 Calculates the vertex normal.
static void PerVertexNormalizedPerFace (ComputeMeshType &m)
 Calculates both vertex and face normals.
static void PerVertexNormalizedPerFaceNormalized (ComputeMeshType &m)
static void PerVertexPerFace (ComputeMeshType &m)
 Calculates both vertex and face normals.
static void PerVertexWeighted (ComputeMeshType &m)
 Calculates the vertex normal. Without exploiting or touching face normals.

Detailed Description

template<class ComputeMeshType>
class vcg::tri::UpdateNormals< ComputeMeshType >

Management, updating and computation of per-vertex and per-face normals.

This class is used to compute or update the normals that can be stored in the vertex or face component of a mesh.

Definition at line 44 of file trimesh/update/normal.h.


Member Typedef Documentation

template<class ComputeMeshType>
typedef MeshType::CoordType vcg::tri::UpdateNormals< ComputeMeshType >::CoordType

Definition at line 49 of file trimesh/update/normal.h.

template<class ComputeMeshType>
typedef MeshType::FaceIterator vcg::tri::UpdateNormals< ComputeMeshType >::FaceIterator

Definition at line 56 of file trimesh/update/normal.h.

template<class ComputeMeshType>
typedef MeshType::FacePointer vcg::tri::UpdateNormals< ComputeMeshType >::FacePointer

Definition at line 55 of file trimesh/update/normal.h.

template<class ComputeMeshType>
typedef MeshType::FaceType vcg::tri::UpdateNormals< ComputeMeshType >::FaceType

Definition at line 54 of file trimesh/update/normal.h.

template<class ComputeMeshType>
typedef ComputeMeshType vcg::tri::UpdateNormals< ComputeMeshType >::MeshType

Definition at line 47 of file trimesh/update/normal.h.

template<class ComputeMeshType>
typedef VertexType::NormalType vcg::tri::UpdateNormals< ComputeMeshType >::NormalType

Definition at line 50 of file trimesh/update/normal.h.

template<class ComputeMeshType>
typedef VertexType::ScalarType vcg::tri::UpdateNormals< ComputeMeshType >::ScalarType

Definition at line 51 of file trimesh/update/normal.h.

template<class ComputeMeshType>
typedef MeshType::VertexIterator vcg::tri::UpdateNormals< ComputeMeshType >::VertexIterator

Definition at line 53 of file trimesh/update/normal.h.

template<class ComputeMeshType>
typedef MeshType::VertexPointer vcg::tri::UpdateNormals< ComputeMeshType >::VertexPointer

Definition at line 52 of file trimesh/update/normal.h.

template<class ComputeMeshType>
typedef MeshType::VertexType vcg::tri::UpdateNormals< ComputeMeshType >::VertexType

Definition at line 48 of file trimesh/update/normal.h.


Member Function Documentation

template<class ComputeMeshType>
static void vcg::tri::UpdateNormals< ComputeMeshType >::AreaNormalizeFace ( ComputeMeshType &  m  )  [inline, static]

Definition at line 257 of file trimesh/update/normal.h.

template<class ComputeMeshType>
static void vcg::tri::UpdateNormals< ComputeMeshType >::NormalizeFace ( ComputeMeshType &  m  )  [inline, static]

Normalize the lenght of the face normals.

Definition at line 250 of file trimesh/update/normal.h.

template<class ComputeMeshType>
static void vcg::tri::UpdateNormals< ComputeMeshType >::NormalizeVertex ( ComputeMeshType &  m  )  [inline, static]

Normalize the lenght of the face normals.

Definition at line 241 of file trimesh/update/normal.h.

template<class ComputeMeshType>
static void vcg::tri::UpdateNormals< ComputeMeshType >::PerBitQuadFaceNormalized ( ComputeMeshType &  m  )  [inline, static]

Definition at line 316 of file trimesh/update/normal.h.

template<class ComputeMeshType>
static void vcg::tri::UpdateNormals< ComputeMeshType >::PerFace ( ComputeMeshType &  m  )  [inline, static]

Calculates the face normal (if stored in the current face type).

Definition at line 60 of file trimesh/update/normal.h.

template<class ComputeMeshType>
static void vcg::tri::UpdateNormals< ComputeMeshType >::PerFaceFromCurrentVertexNormal ( ComputeMeshType &  m  )  [inline, static]

Calculates the vertex normal. Exploiting or current face normals.

The normal of a face f is the average of the normals of the vertices of f.

Definition at line 94 of file trimesh/update/normal.h.

template<class ComputeMeshType>
static void vcg::tri::UpdateNormals< ComputeMeshType >::PerFaceMatrix ( ComputeMeshType &  m,
const Matrix44< ScalarType > &  mat,
bool  remove_scaling = true 
) [inline, static]

Multiply the face normals by the matrix passed. By default, the scale component is removed.

Definition at line 364 of file trimesh/update/normal.h.

template<class ComputeMeshType>
static void vcg::tri::UpdateNormals< ComputeMeshType >::PerFaceNormalized ( ComputeMeshType &  m  )  [inline, static]

Definition at line 308 of file trimesh/update/normal.h.

template<class ComputeMeshType>
static void vcg::tri::UpdateNormals< ComputeMeshType >::PerFaceRW ( ComputeMeshType &  m,
bool  normalize = false 
) [inline, static]

Definition at line 274 of file trimesh/update/normal.h.

template<class ComputeMeshType>
static void vcg::tri::UpdateNormals< ComputeMeshType >::PerVertex ( ComputeMeshType &  m  )  [inline, static]

Calculates the vertex normal. Without exploiting or touching face normals.

The normal of a vertex v is the classical area weigthed average of the normals of the faces incident on v.

Definition at line 179 of file trimesh/update/normal.h.

template<class ComputeMeshType>
static void vcg::tri::UpdateNormals< ComputeMeshType >::PerVertexAngleWeighted ( ComputeMeshType &  m  )  [inline, static]

Calculates the vertex normal. Without exploiting or touching face normals.

The normal of a vertex v computed as a weighted sum f the incident face normals. The weight is simlply the angle of the involved wedge. Described in:

G. Thurmer, C. A. Wuthrich "Computing vertex normals from polygonal facets" Journal of Graphics Tools, 1998

Definition at line 119 of file trimesh/update/normal.h.

template<class ComputeMeshType>
static void vcg::tri::UpdateNormals< ComputeMeshType >::PerVertexFromCurrentFaceNormal ( ComputeMeshType &  m  )  [inline, static]

Calculates the vertex normal. Exploiting or current face normals.

The normal of a vertex v is the weigthed average of the normals of the faces incident on v.

Definition at line 72 of file trimesh/update/normal.h.

template<class ComputeMeshType>
static void vcg::tri::UpdateNormals< ComputeMeshType >::PerVertexMatrix ( ComputeMeshType &  m,
const Matrix44< ScalarType > &  mat,
bool  remove_scaling = true 
) [inline, static]

Multiply the vertex normals by the matrix passed. By default, the scale component is removed.

Definition at line 344 of file trimesh/update/normal.h.

template<class ComputeMeshType>
static void vcg::tri::UpdateNormals< ComputeMeshType >::PerVertexNormalized ( ComputeMeshType &  m  )  [inline, static]

Calculates the vertex normal.

Definition at line 334 of file trimesh/update/normal.h.

template<class ComputeMeshType>
static void vcg::tri::UpdateNormals< ComputeMeshType >::PerVertexNormalizedPerFace ( ComputeMeshType &  m  )  [inline, static]

Calculates both vertex and face normals.

The normal of a vertex v is the weigthed average of the normals of the faces incident on v.

Definition at line 234 of file trimesh/update/normal.h.

template<class ComputeMeshType>
static void vcg::tri::UpdateNormals< ComputeMeshType >::PerVertexNormalizedPerFaceNormalized ( ComputeMeshType &  m  )  [inline, static]

Definition at line 268 of file trimesh/update/normal.h.

template<class ComputeMeshType>
static void vcg::tri::UpdateNormals< ComputeMeshType >::PerVertexPerFace ( ComputeMeshType &  m  )  [inline, static]

Calculates both vertex and face normals.

The normal of a vertex v is the weigthed average of the normals of the faces incident on v.

Definition at line 208 of file trimesh/update/normal.h.

template<class ComputeMeshType>
static void vcg::tri::UpdateNormals< ComputeMeshType >::PerVertexWeighted ( ComputeMeshType &  m  )  [inline, static]

Calculates the vertex normal. Without exploiting or touching face normals.

The normal of a vertex v is computed according to the formula described by Nelson Max in Max, N., "Weights for Computing Vertex Normals from Facet Normals", Journal of Graphics Tools, 4(2) (1999)

The weight for each wedge is the cross product of the two edge over the product of the square of the two edge lengths. According to the original paper it is perfect only for spherical surface, but it should perform well...

Definition at line 150 of file trimesh/update/normal.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


vcglib
Author(s): Christian Bersch
autogenerated on Fri Jan 11 09:23:36 2013