Public Types | Static Public Member Functions
vcg::tri::UpdateNormal< ComputeMeshType > Class Template Reference

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

#include <vcg/complex/algorithms/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 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 NormalizePerVertex (ComputeMeshType &m)
 Normalize the length of the vertex normals.
static void PerBitPolygonFaceNormalized (ComputeMeshType &m)
 Exploit bitquads to compute a per-polygon face normal.
static void PerBitQuadFaceNormalized (ComputeMeshType &m)
 Exploit bitquads to compute a per-polygon face normal.
static void PerFace (ComputeMeshType &m)
 Calculates the face normal.
static void PerFaceFromCurrentVertexNormal (ComputeMeshType &m)
 Calculates the face normal by averaging the current per-vertex 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)
 Equivalent to PerFace() and NormalizePerFace()
static void PerFacePolygonal (ComputeMeshType &m)
static void PerFaceRW (ComputeMeshType &m, bool normalize=false)
static void PerPolygonalFace (ComputeMeshType &m)
 computePerPolygonalFace computes the normal of each polygonal face.
static void PerPolygonalFaceNormalized (ComputeMeshType &m)
 Equivalent to PerPolygonalFace() and NormalizePerFace()
static void PerVertex (ComputeMeshType &m)
 Calculates the vertex normal as the classic area weighted average. It does not need or exploit current face normals.
static void PerVertexAngleWeighted (ComputeMeshType &m)
 Calculates the vertex normal as an angle weighted average. It does not need or exploit current face normals.
static void PerVertexClear (ComputeMeshType &m, bool ClearAllVertNormal=false)
 Set to zero all the PerVertex normals.
static void PerVertexFromCurrentFaceNormal (ComputeMeshType &m)
 Calculates the vertex normal by averaging the current per-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 PerVertexNelsonMaxWeighted (ComputeMeshType &m)
 Calculates the vertex normal using the Max et al. weighting scheme. It does not need or exploit current face normals.
static void PerVertexNormalized (ComputeMeshType &m)
 Equivalent to PerVertex() and NormalizePerVertex()
static void PerVertexNormalizedPerFace (ComputeMeshType &m)
 Equivalent to PerVertexNormalized() and PerFace().
static void PerVertexNormalizedPerFaceNormalized (ComputeMeshType &m)
 Equivalent to PerVertexNormalizedPerFace() and NormalizePerFace().
static void PerVertexPerFace (ComputeMeshType &m)
 Equivalent to PerVertex() and PerFace().
static void PerWedgeCrease (ComputeMeshType &m, ScalarType angleRad)
 Compute per wedge normals taking into account the angle between adjacent faces.

Detailed Description

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

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

Definition at line 48 of file normal.h.


Member Typedef Documentation

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

Definition at line 53 of file normal.h.

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

Definition at line 60 of file normal.h.

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

Definition at line 59 of file normal.h.

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

Definition at line 58 of file normal.h.

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

Definition at line 51 of file normal.h.

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

Definition at line 54 of file normal.h.

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

Definition at line 55 of file normal.h.

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

Definition at line 57 of file normal.h.

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

Definition at line 56 of file normal.h.

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

Definition at line 52 of file normal.h.


Member Function Documentation

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

Normalize the length of the face normals.

Definition at line 245 of file normal.h.

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

Set the length of the face normals to their area (without recomputing their directions).

Definition at line 253 of file normal.h.

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

Normalize the length of the vertex normals.

Definition at line 236 of file normal.h.

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

Exploit bitquads to compute a per-polygon face normal.

Definition at line 322 of file normal.h.

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

Exploit bitquads to compute a per-polygon face normal.

Definition at line 307 of file normal.h.

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

Calculates the face normal.

Not normalized. Use PerFaceNormalized() or call NormalizePerVertex() if you need unit length per face normals.

Definition at line 168 of file normal.h.

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

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.

Definition at line 219 of file normal.h.

template<class ComputeMeshType >
static void vcg::tri::UpdateNormal< 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 367 of file normal.h.

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

Equivalent to PerFace() and NormalizePerFace()

Definition at line 273 of file normal.h.

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

Definition at line 103 of file normal.h.

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

Definition at line 423 of file normal.h.

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

computePerPolygonalFace computes the normal of each polygonal face.

Not normalized. Use PerPolygonalFaceNormalized() or call NormalizePerFace() if you need unit length per face normals.

Definition at line 180 of file normal.h.

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

Equivalent to PerPolygonalFace() and NormalizePerFace()

Definition at line 280 of file normal.h.

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

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.

Definition at line 89 of file normal.h.

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

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

Definition at line 121 of file normal.h.

template<class ComputeMeshType >
static void vcg::tri::UpdateNormal< ComputeMeshType >::PerVertexClear ( ComputeMeshType &  m,
bool  ClearAllVertNormal = false 
) [inline, static]

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

Definition at line 67 of file normal.h.

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

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.

Definition at line 196 of file normal.h.

template<class ComputeMeshType >
static void vcg::tri::UpdateNormal< 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 345 of file normal.h.

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

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...

Definition at line 147 of file normal.h.

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

Equivalent to PerVertex() and NormalizePerVertex()

Definition at line 266 of file normal.h.

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

Equivalent to PerVertexNormalized() and PerFace().

Definition at line 293 of file normal.h.

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

Equivalent to PerVertexNormalizedPerFace() and NormalizePerFace().

Definition at line 300 of file normal.h.

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

Equivalent to PerVertex() and PerFace().

Definition at line 286 of file normal.h.

template<class ComputeMeshType >
static void vcg::tri::UpdateNormal< ComputeMeshType >::PerWedgeCrease ( ComputeMeshType &  m,
ScalarType  angleRad 
) [inline, static]

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.

Definition at line 392 of file normal.h.


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


shape_reconstruction
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:43:53