$darkmode
Management, updating and computation of per-vertex, per-face, and per-wedge normals. More...
#include <vcg/complex/algorithms/update/normal.h>
Static Public Member Functions | |
static void | PerVertexClear (ComputeMeshType &m, bool ClearAllVertNormal=false) |
Set to zero all the PerVertex normals. More... | |
static void | PerVertex (ComputeMeshType &m) |
Calculates the vertex normal as the classic area weighted average. It does not need or exploit current face normals. More... | |
static void | PerFacePolygonal (ComputeMeshType &m) |
static void | PerVertexAngleWeighted (ComputeMeshType &m) |
Calculates the vertex normal as an angle weighted average. It does not need or exploit current face normals. More... | |
static void | PerVertexNelsonMaxWeighted (ComputeMeshType &m) |
Calculates the vertex normal using the Max et al. weighting scheme. It does not need or exploit current face normals. More... | |
static void | PerFace (ComputeMeshType &m) |
Calculates the face normal. More... | |
static void | PerPolygonalFace (ComputeMeshType &m) |
computePerPolygonalFace computes the normal of each polygonal face. More... | |
static void | PerVertexFromCurrentFaceNormal (ComputeMeshType &m) |
Calculates the vertex normal by averaging the current per-face normals. More... | |
static void | PerFaceFromCurrentVertexNormal (ComputeMeshType &m) |
Calculates the face normal by averaging the current per-vertex normals. More... | |
static void | NormalizePerVertex (ComputeMeshType &m) |
Normalize the length of the vertex normals. | |
static void | NormalizePerFace (ComputeMeshType &m) |
Normalize the length of the face normals. | |
static void | NormalizePerFaceByArea (ComputeMeshType &m) |
Set the length of the face normals to their area (without recomputing their directions). | |
static void | PerVertexNormalized (ComputeMeshType &m) |
Equivalent to PerVertex() and NormalizePerVertex() | |
static void | PerFaceNormalized (ComputeMeshType &m) |
Equivalent to PerFace() and NormalizePerFace() | |
static void | PerPolygonalFaceNormalized (ComputeMeshType &m) |
Equivalent to PerPolygonalFace() and NormalizePerFace() | |
static void | PerVertexPerFace (ComputeMeshType &m) |
Equivalent to PerVertex() and PerFace(). | |
static void | PerVertexNormalizedPerFace (ComputeMeshType &m) |
Equivalent to PerVertexNormalized() and PerFace(). | |
static void | PerVertexNormalizedPerFaceNormalized (ComputeMeshType &m) |
Equivalent to PerVertexNormalizedPerFace() and NormalizePerFace(). | |
static void | PerBitQuadFaceNormalized (ComputeMeshType &m) |
Exploit bitquads to compute a per-polygon face normal. | |
static void | PerBitPolygonFaceNormalized (ComputeMeshType &m) |
Exploit bitquads to compute a per-polygon face 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. | |
static void | PerWedgeCrease (ComputeMeshType &m, ScalarType angleRad) |
Compute per wedge normals taking into account the angle between adjacent faces. More... | |
static void | PerFaceRW (ComputeMeshType &m, bool normalize=false) |
Management, updating and computation of per-vertex, per-face, and per-wedge normals.
This class is used to compute or to update the normals that can be stored in the various component of a mesh. A number of different algorithms for computing per vertex normals are present.
It must be included after complex.h
|
inlinestatic |
Calculates the face normal.
Not normalized. Use PerFaceNormalized() or call NormalizePerVertex() if you need unit length per face normals.
|
inlinestatic |
Calculates the face normal by averaging the current per-vertex normals.
The normal of a face f is the average of the normals of the vertices of f.
|
inlinestatic |
computePerPolygonalFace computes the normal of each polygonal face.
Not normalized. Use PerPolygonalFaceNormalized() or call NormalizePerFace() if you need unit length per face normals.
|
inlinestatic |
Calculates the vertex normal as the classic area weighted average. It does not need or exploit current face normals.
The normal of a vertex v is the classical area-weigthed average of the normals of the faces incident on v.
|
inlinestatic |
Calculates the vertex normal as an angle weighted average. It does not need or exploit current 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
|
inlinestatic |
Set to zero all the PerVertex normals.
Set to zero all the PerVertex normals. Used by all the face averaging algorithms. by default it does not clear the normals of unreferenced vertices because they could be still useful
|
inlinestatic |
Calculates the vertex normal by averaging the current per-face normals.
The normal of a vertex v is the average of the un-normalized normals of the faces incident on v.
|
inlinestatic |
Calculates the vertex normal using the Max et al. weighting scheme. It does not need or exploit current 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...
|
inlinestatic |
Compute per wedge normals taking into account the angle between adjacent faces.
The PerWedge normals are averaged on common vertexes only if the angle between two faces is larger than angleRad
. It requires FFAdjacency.