Management, updating and computation of per-vertex and per-face normals.
More...
#include <vcg/complex/trimesh/update/normal.h>
|
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.
|
|
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.
◆ NormalizeFace()
template<class ComputeMeshType >
Normalize the lenght of the face normals.
◆ NormalizeVertex()
template<class ComputeMeshType >
Normalize the lenght of the face normals.
◆ PerFace()
template<class ComputeMeshType >
Calculates the face normal (if stored in the current face type)
◆ PerFaceFromCurrentVertexNormal()
template<class ComputeMeshType >
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.
◆ PerFaceMatrix()
template<class ComputeMeshType >
static void vcg::tri::UpdateNormals< ComputeMeshType >::PerFaceMatrix |
( |
ComputeMeshType & | m, |
|
|
const Matrix44< ScalarType > & | mat, |
|
|
bool | remove_scaling = true ) |
|
inlinestatic |
Multiply the face normals by the matrix passed. By default, the scale component is removed.
◆ PerVertex()
template<class ComputeMeshType >
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.
◆ PerVertexAngleWeighted()
template<class ComputeMeshType >
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
◆ PerVertexFromCurrentFaceNormal()
template<class ComputeMeshType >
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.
◆ PerVertexMatrix()
template<class ComputeMeshType >
static void vcg::tri::UpdateNormals< ComputeMeshType >::PerVertexMatrix |
( |
ComputeMeshType & | m, |
|
|
const Matrix44< ScalarType > & | mat, |
|
|
bool | remove_scaling = true ) |
|
inlinestatic |
Multiply the vertex normals by the matrix passed. By default, the scale component is removed.
◆ PerVertexNormalized()
template<class ComputeMeshType >
Calculates the vertex normal.
◆ PerVertexNormalizedPerFace()
template<class ComputeMeshType >
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.
◆ PerVertexPerFace()
template<class ComputeMeshType >
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.
◆ PerVertexWeighted()
template<class ComputeMeshType >
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...
The documentation for this class was generated from the following file: