VCG Library
0.1
|
Management, updating and computation of per-vertex and per-face normals. More...
#include <vcg/complex/trimesh/update/normal.h>
Static Public Member Functions | |
static void | PerFace (ComputeMeshType &m) |
Calculates the face normal (if stored in the current face type) | |
static void | PerVertexFromCurrentFaceNormal (ComputeMeshType &m) |
Calculates the vertex normal. Exploiting or current face normals. | |
static void | PerFaceFromCurrentVertexNormal (ComputeMeshType &m) |
Calculates the vertex normal. Exploiting or current face normals. | |
static void | PerVertexAngleWeighted (ComputeMeshType &m) |
Calculates the vertex normal. Without exploiting or touching face normals. | |
static void | PerVertexWeighted (ComputeMeshType &m) |
Calculates the vertex normal. Without exploiting or touching face normals. | |
static void | PerVertex (ComputeMeshType &m) |
Calculates the vertex normal. Without exploiting or touching face normals. | |
static void | PerVertexPerFace (ComputeMeshType &m) |
Calculates both vertex and face normals. | |
static void | PerVertexNormalizedPerFace (ComputeMeshType &m) |
Calculates both vertex and face normals. | |
static void | NormalizeVertex (ComputeMeshType &m) |
Normalize the lenght of the face normals. | |
static void | NormalizeFace (ComputeMeshType &m) |
Normalize the lenght of the face normals. | |
static void | PerVertexNormalized (ComputeMeshType &m) |
Calculates the vertex normal. | |
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 | 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. |
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.
static void vcg::tri::UpdateNormals< ComputeMeshType >::NormalizeFace | ( | ComputeMeshType & | m | ) | [inline, static] |
Normalize the lenght of the face normals.
static void vcg::tri::UpdateNormals< ComputeMeshType >::NormalizeVertex | ( | ComputeMeshType & | m | ) | [inline, static] |
Normalize the lenght of the face normals.
static void vcg::tri::UpdateNormals< ComputeMeshType >::PerFace | ( | ComputeMeshType & | m | ) | [inline, static] |
Calculates the face normal (if stored in the current face type)
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.
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.
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.
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
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.
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.
static void vcg::tri::UpdateNormals< ComputeMeshType >::PerVertexNormalized | ( | ComputeMeshType & | m | ) | [inline, static] |
Calculates the vertex normal.
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.
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.
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...