$darkmode
VCG Library
Public Types | Static Public Member Functions | List of all members
vcg::tri::UpdateQuality< UpdateMeshType > Class Template Reference

Generation of per-vertex and per-face qualities. More...

#include <vcg/complex/algorithms/update/quality.h>

Public Types

typedef UpdateMeshType MeshType
 
typedef MeshType::ScalarType ScalarType
 
typedef MeshType::CoordType CoordType
 
typedef MeshType::VertexType VertexType
 
typedef MeshType::VertexPointer VertexPointer
 
typedef MeshType::VertexIterator VertexIterator
 
typedef MeshType::FaceType FaceType
 
typedef MeshType::FacePointer FacePointer
 
typedef MeshType::FaceIterator FaceIterator
 
typedef MeshType::VertexType::QualityType VertexQualityType
 
typedef MeshType::FaceType::QualityType FaceQualityType
 
typedef MeshType::TetraType TetraType
 
typedef MeshType::TetraPointer TetraPointer
 
typedef MeshType::TetraIterator TetraIterator
 
typedef MeshType::TetraType::QualityType TetraQualityType
 

Static Public Member Functions

static void VertexConstant (MeshType &m, VertexQualityType q)
 
static void VertexValence (UpdateMeshType &m)
 
static void VertexClamp (MeshType &m, VertexQualityType qmin, VertexQualityType qmax)
 
static void VertexNormalize (MeshType &m, VertexQualityType qmin=0.0, VertexQualityType qmax=1.0)
 
static void FaceNormalize (MeshType &m, FaceQualityType qmin=0.0, FaceQualityType qmax=1.0)
 
static void FaceConstant (MeshType &m, FaceQualityType q)
 
static void FaceArea (MeshType &m)
 
static void TetraConstant (MeshType &m, const TetraQualityType q)
 
static void TetraFromVolume (MeshType &m)
 
static void TetraFromAspectRatio (MeshType &m)
 
static void VertexFromFace (MeshType &m, bool areaWeighted=true)
 
static void VertexFromTetra (MeshType &m, bool volumeWeighted=true)
 
template<class HandleScalar >
static void VertexFromAttributeHandle (MeshType &m, typename MeshType::template PerVertexAttributeHandle< HandleScalar > &h)
 
static void VertexFromAttributeName (MeshType &m, const std::string &AttrName)
 
template<class HandleScalar >
static void FaceFromAttributeHandle (MeshType &m, typename MeshType::template PerFaceAttributeHandle< HandleScalar > &h)
 
static void FaceFromAttributeName (MeshType &m, const std::string &AttrName)
 
static void FaceFromVertex (MeshType &m)
 
static void VertexFromPlane (MeshType &m, const Plane3< ScalarType > &pl)
 
static void VertexGaussianFromCurvatureDir (MeshType &m)
 
static void VertexMeanFromCurvatureDir (MeshType &m)
 
static void VertexMinCurvFromCurvatureDir (MeshType &m)
 
static void VertexMaxCurvFromCurvatureDir (MeshType &m)
 
static void VertexShapeIndexFromCurvatureDir (MeshType &m)
 VertexShapeIndexFromCurvatureDir Compute from the current Curvature Direction the Shape Index S as defined by [Koenderink 1992] and store it in the per-vertex Quality. S = 2/pi atan(k1+k2/k1-k2) More...
 
static void VertexCurvednessFromCurvatureDir (MeshType &m)
 VertexCurvednessFromCurvatureDir Compute from the current Curvature Direction the Curvedness as defined by [Koenderink 1992] and store it in the per-vertex Quality. C = Sqrt((k1*k1+k2*k2)/2.0) More...
 
static void VertexAbsoluteCurvatureFromHGAttribute (MeshType &m)
 
static void VertexRMSCurvatureFromHGAttribute (MeshType &m)
 
static void FaceSaturate (MeshType &m, FaceQualityType gradientThr=1.0)
 
static void VertexSaturate (MeshType &m, ScalarType gradientThr=1.0)
 Saturate Vertex Quality Saturate the vertex quality so that for each vertex the gradient of the quality field is lower than the given threshold value (in absolute value) The saturation is done in a conservative way (quality is always decreased and never increased) More...
 

Detailed Description

template<class UpdateMeshType>
class vcg::tri::UpdateQuality< UpdateMeshType >

Generation of per-vertex and per-face qualities.

It works according to various strategy, like geodesic distance from the border (UpdateQuality::VertexGeodesicFromBorder) or curvature ecc. This class is templated over the mesh and (like all other Update* classes) has only static members; Typical usage:

MyMeshType m;
UpdateQuality<MyMeshType>::VertexGeodesicFromBorder(m);

Member Function Documentation

◆ FaceArea()

template<class UpdateMeshType >
static void vcg::tri::UpdateQuality< UpdateMeshType >::FaceArea ( MeshType &  m)
inlinestatic

Assign to each face of the mesh its area.

◆ FaceConstant()

template<class UpdateMeshType >
static void vcg::tri::UpdateQuality< UpdateMeshType >::FaceConstant ( MeshType &  m,
FaceQualityType  q 
)
inlinestatic

Assign to each face of the mesh a constant quality value. Useful for initialization.

◆ FaceNormalize()

template<class UpdateMeshType >
static void vcg::tri::UpdateQuality< UpdateMeshType >::FaceNormalize ( MeshType &  m,
FaceQualityType  qmin = 0.0,
FaceQualityType  qmax = 1.0 
)
inlinestatic

Normalize the face quality so that it fits in the specified range.

◆ VertexClamp()

template<class UpdateMeshType >
static void vcg::tri::UpdateQuality< UpdateMeshType >::VertexClamp ( MeshType &  m,
VertexQualityType  qmin,
VertexQualityType  qmax 
)
inlinestatic

Clamp each vertex of the mesh with a range of values.

◆ VertexConstant()

template<class UpdateMeshType >
static void vcg::tri::UpdateQuality< UpdateMeshType >::VertexConstant ( MeshType &  m,
VertexQualityType  q 
)
inlinestatic

Assign to each vertex of the mesh a constant quality value. Useful for initialization.

◆ VertexCurvednessFromCurvatureDir()

template<class UpdateMeshType >
static void vcg::tri::UpdateQuality< UpdateMeshType >::VertexCurvednessFromCurvatureDir ( MeshType &  m)
inlinestatic

VertexCurvednessFromCurvatureDir Compute from the current Curvature Direction the Curvedness as defined by [Koenderink 1992] and store it in the per-vertex Quality. C = Sqrt((k1*k1+k2*k2)/2.0)

J. Koenderink and A. van Doorn. Surface shape and curvature scales. Image and vision computing, 10(8):557–565, 1992.

◆ VertexNormalize()

template<class UpdateMeshType >
static void vcg::tri::UpdateQuality< UpdateMeshType >::VertexNormalize ( MeshType &  m,
VertexQualityType  qmin = 0.0,
VertexQualityType  qmax = 1.0 
)
inlinestatic

Normalize the vertex quality so that it fits in the specified range.

◆ VertexSaturate()

template<class UpdateMeshType >
static void vcg::tri::UpdateQuality< UpdateMeshType >::VertexSaturate ( MeshType &  m,
ScalarType  gradientThr = 1.0 
)
inlinestatic

Saturate Vertex Quality Saturate the vertex quality so that for each vertex the gradient of the quality field is lower than the given threshold value (in absolute value) The saturation is done in a conservative way (quality is always decreased and never increased)

Note: requires VF adjacency.

◆ VertexShapeIndexFromCurvatureDir()

template<class UpdateMeshType >
static void vcg::tri::UpdateQuality< UpdateMeshType >::VertexShapeIndexFromCurvatureDir ( MeshType &  m)
inlinestatic

VertexShapeIndexFromCurvatureDir Compute from the current Curvature Direction the Shape Index S as defined by [Koenderink 1992] and store it in the per-vertex Quality. S = 2/pi atan(k1+k2/k1-k2)

J. Koenderink and A. van Doorn. Surface shape and curvature scales. Image and vision computing, 10(8):557–565, 1992.

◆ VertexValence()

template<class UpdateMeshType >
static void vcg::tri::UpdateQuality< UpdateMeshType >::VertexValence ( UpdateMeshType &  m)
inlinestatic

Assign to each vertex of the mesh the valence of faces.


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