Aim: Utility class to compute curvature measures induced by (1) a corrected normal current defined by a surface mesh with prescribed normals and (2) the standard Lipschitz-Killing invariant forms of area and curvatures.
More...
#include <DGtal/geometry/meshes/CorrectedNormalCurrentComputer.h>
template<typename TRealPoint, typename TRealVector>
struct DGtal::CorrectedNormalCurrentComputer< TRealPoint, TRealVector >
Aim: Utility class to compute curvature measures induced by (1) a corrected normal current defined by a surface mesh with prescribed normals and (2) the standard Lipschitz-Killing invariant forms of area and curvatures.
Description of template class 'CorrectedNormalCurrentComputer'
- Note
- By default it tries to compute interpolated corrected curvature measures, if the mesh has a normal at each vertex, otherwise it computes constant corrected curvature measures.
- Template Parameters
-
TRealPoint | an arbitrary model of RealPoint. |
TRealVector | an arbitrary model of RealVector. |
- Examples
- geometry/meshes/curvature-comparator-ii-cnc-3d.cpp, geometry/meshes/curvature-measures-icnc-3d.cpp, geometry/meshes/curvature-measures-icnc-XY-3d.cpp, geometry/meshes/digpoly-curvature-measures-cnc-3d.cpp, geometry/meshes/digpoly-curvature-measures-cnc-XY-3d.cpp, geometry/meshes/obj-curvature-measures-icnc-3d.cpp, geometry/meshes/obj-curvature-measures-icnc-XY-3d.cpp, geometry/meshes/vol-curvature-measures-icnc-3d.cpp, and geometry/meshes/vol-curvature-measures-icnc-XY-3d.cpp.
Definition at line 69 of file CorrectedNormalCurrentComputer.h.
◆ Face
template<typename TRealPoint , typename TRealVector >
◆ Formula
template<typename TRealPoint , typename TRealVector >
◆ Index
template<typename TRealPoint , typename TRealVector >
◆ RealPoint
template<typename TRealPoint , typename TRealVector >
◆ RealPoints
template<typename TRealPoint , typename TRealVector >
◆ RealTensor
template<typename TRealPoint , typename TRealVector >
◆ RealTensors
template<typename TRealPoint , typename TRealVector >
◆ RealVector
template<typename TRealPoint , typename TRealVector >
◆ RealVectors
template<typename TRealPoint , typename TRealVector >
◆ Scalar
template<typename TRealPoint , typename TRealVector >
◆ ScalarMeasure
template<typename TRealPoint , typename TRealVector >
◆ Scalars
template<typename TRealPoint , typename TRealVector >
◆ Self
template<typename TRealPoint , typename TRealVector >
◆ Size
template<typename TRealPoint , typename TRealVector >
◆ SurfaceMesh
template<typename TRealPoint , typename TRealVector >
◆ TensorMeasure
template<typename TRealPoint , typename TRealVector >
◆ Vertex
template<typename TRealPoint , typename TRealVector >
◆ CorrectedNormalCurrentComputer()
template<typename TRealPoint , typename TRealVector >
Constructor from mesh.
- Parameters
-
aMesh | any simplified mesh that is referenced in this object. |
unit_u | when set to 'true' tells the computer to normalize corrected normals in curvature formulae. For instance, for the Gaussian curvature, it induces exact Gaussian curvature computation with spherical triangles. |
◆ BOOST_STATIC_ASSERT()
template<typename TRealPoint , typename TRealVector >
◆ computeMu0()
template<typename TRealPoint , typename TRealVector >
- Returns
- the \( \mu_0 \) corrected curvature measure, i.e. the area measure.
◆ computeMu0ConstantU()
template<typename TRealPoint , typename TRealVector >
- Returns
- the \( \mu_0 \) corrected curvature measure, i.e. the area measure, when corrected normals are constant per face.
- Precondition
! myMesh.faceNormals().empty()
◆ computeMu0InterpolatedU()
template<typename TRealPoint , typename TRealVector >
- Returns
- the \( \mu_0 \) corrected curvature measure, i.e. the area measure, when corrected normals are interpolated per face.
- Precondition
! myMesh.vertexNormals().empty()
◆ computeMu1()
template<typename TRealPoint , typename TRealVector >
- Returns
- the \( \mu_1 \) corrected curvature measure, i.e. twice the mean curvature measure.
◆ computeMu1ConstantU()
template<typename TRealPoint , typename TRealVector >
- Returns
- the \( \mu_1 \) corrected curvature measure, i.e. twice the mean curvature measure, when corrected normals are constant per face.
- Precondition
! myMesh.faceNormals().empty()
◆ computeMu1InterpolatedU()
template<typename TRealPoint , typename TRealVector >
- Returns
- the \( \mu_1 \) corrected curvature measure, i.e. twice the mean curvature measure, when corrected normals are interpolated per face.
- Precondition
! myMesh.vertexNormals().empty()
◆ computeMu2()
template<typename TRealPoint , typename TRealVector >
- Returns
- the \( \mu_2 \) corrected curvature measure, i.e. the Gaussian curvature measure.
◆ computeMu2ConstantU()
template<typename TRealPoint , typename TRealVector >
- Returns
- the \( \mu_2 \) corrected curvature measure, i.e. the Gaussian curvature measure, when corrected normals are constant per face.
- Precondition
! myMesh.faceNormals().empty()
◆ computeMu2InterpolatedU()
template<typename TRealPoint , typename TRealVector >
- Returns
- the \( \mu_2 \) corrected curvature measure, i.e. the Gaussian curvature measure, when corrected normals are interpolated per face.
- Precondition
! myMesh.vertexNormals().empty()
◆ computeMuXY()
template<typename TRealPoint , typename TRealVector >
- Returns
- the \( \mu^{X,Y} \) corrected curvature measure, i.e. the anisotropic tensor curvature measure.
◆ computeMuXYConstantU()
template<typename TRealPoint , typename TRealVector >
- Returns
- the \( \mu^{X,Y} \) corrected curvature measure, i.e. the anisotropic tensor curvature measure, when corrected normals are constant per face.
- Precondition
! myMesh.faceNormals().empty()
◆ computeMuXYInterpolatedU()
template<typename TRealPoint , typename TRealVector >
- Returns
- the \( \mu^{X,Y} \) corrected curvature measure, i.e. the anisotropic tensor curvature measure, when corrected normals are interpolated per face.
- Precondition
! myMesh.vertexNormals().empty()
◆ GaussianCurvature()
template<typename TRealPoint , typename TRealVector >
- Parameters
-
mu0 | the mu0 measure (i.e. area) of some set |
mu2 | the mu2 measure (i.e. the Gaussian curvature measue) of the same set |
- Returns
- the estimated Gaussian curvature on this set.
Definition at line 135 of file CorrectedNormalCurrentComputer.h.
136 {
137 return ( mu0 != 0.0 ) ? mu2 / mu0 : 0.0;
138 }
◆ meanCurvature()
template<typename TRealPoint , typename TRealVector >
- Parameters
-
mu0 | the mu0 measure (i.e. area) of some set |
mu1 | the mu1 measure (i.e. twice the mean curvature measue) of the same set |
- Returns
- the estimated mean curvature on this set.
Definition at line 126 of file CorrectedNormalCurrentComputer.h.
127 {
128 return ( mu0 != 0.0 ) ? mu1 / ( 2.0 * mu0 ) : 0.0;
129 }
◆ principalCurvatures()
template<typename TRealPoint , typename TRealVector >
- Parameters
-
mu0 | the mu0 measure (i.e. area) of some set |
muXY | the anisotropic muXY measure (i.e. the second fundamental form measue) of the same set |
N | the normal vector at the location of the set |
- Returns
- a tuple (K1,K2,D1,D2) where K1 and K2 are two principal curvatures (K1<=K2) and D1 and D2 are their associated principal directions.
Definition at line 149 of file CorrectedNormalCurrentComputer.h.
150 {
151 muXY += muXY.transpose();
152 muXY *= 0.5;
153 const double coef_N = 1000.0 * mu0;
154
155
156 for ( int j = 0; j < 3; j++ )
157 for ( int k = 0; k < 3; k++ )
158 muXY( j, k ) += coef_N * N[ j ] * N[ k ];
160 RealVector L;
162 return std::make_tuple( ( mu0 != 0.0 ) ? -L[ 1 ] / mu0 : 0.0,
163 ( mu0 != 0.0 ) ? -L[ 0 ] / mu0 : 0.0,
164 V.column( 1 ),
165 V.column( 0 ) );
166 }
static void getEigenDecomposition(const Matrix &matrix, Matrix &eigenVectors, Vector &eigenValues)
Compute both eigen vectors and eigen values from an input matrix.
SimpleMatrix< Scalar, dimension, dimension > RealTensor
References DGtal::SimpleMatrix< TComponent, TM, TN >::column(), DGtal::EigenDecomposition< TN, TComponent, TMatrix >::getEigenDecomposition(), and DGtal::SimpleMatrix< TComponent, TM, TN >::transpose().
◆ dimension
template<typename TRealPoint , typename TRealVector >
◆ myMesh
template<typename TRealPoint , typename TRealVector >
◆ myUnitU
template<typename TRealPoint , typename TRealVector >
The documentation for this struct was generated from the following file: