DGtal  1.1.0
Public Types | Public Member Functions | Static Public Attributes
DGtal::SurfaceMeshHelper< TRealPoint, TRealVector > Struct Template Reference

Aim: An helper class for building classical meshes. More...

#include <DGtal/shapes/SurfaceMeshHelper.h>

Public Types

enum  NormalsType { NormalsType::NO_NORMALS, NormalsType::VERTEX_NORMALS, NormalsType::FACE_NORMALS }
 
typedef TRealPoint RealPoint
 
typedef TRealVector RealVector
 
typedef SurfaceMeshHelper< RealPoint, RealVectorSelf
 
typedef DGtal::SurfaceMesh< RealPoint, RealVectorSurfaceMesh
 
typedef RealVector::Component Scalar
 
typedef std::vector< ScalarScalars
 
typedef std::vector< RealVectorRealVectors
 
typedef SurfaceMesh::Size Size
 
typedef SurfaceMesh::Index Index
 
typedef SurfaceMesh::Vertices Vertices
 
typedef SurfaceMesh::Faces Faces
 

Public Member Functions

 BOOST_STATIC_ASSERT ((dimension==3))
 

Static Public Member Functions

Sphere services
static SurfaceMesh makeSphere (const Scalar radius, const RealPoint &center, Size m, Size n, NormalsType normals)
 
static Scalars sphereMeanCurvatures (const Scalar radius, Size m, Size n)
 
static Scalars sphereGaussianCurvatures (const Scalar radius, Size m, Size n)
 
static Scalars sphereFirstPrincipalCurvatures (const Scalar radius, Size m, Size n)
 
static Scalars sphereSecondPrincipalCurvatures (const Scalar radius, Size m, Size n)
 
static RealVectors sphereFirstPrincipalDirections (const Scalar radius, Size m, Size n)
 
static RealVectors sphereSecondPrincipalDirections (const Scalar radius, Size m, Size n)
 
Schwarz lantern services
static SurfaceMesh makeLantern (const Scalar radius, const Scalar height, const RealPoint &center, Size m, Size n, const NormalsType normals)
 
static Scalars lanternMeanCurvatures (const Scalar radius, Size m, Size n)
 
static Scalars lanternGaussianCurvatures (const Scalar radius, Size m, Size n)
 
static Scalars lanternFirstPrincipalCurvatures (const Scalar radius, Size m, Size n)
 
static Scalars lanternSecondPrincipalCurvatures (const Scalar radius, Size m, Size n)
 
static RealVectors lanternFirstPrincipalDirections (const Scalar radius, Size m, Size n)
 
static RealVectors lanternSecondPrincipalDirections (const Scalar radius, Size m, Size n)
 
Torus services
static SurfaceMesh makeTorus (const Scalar big_radius, const Scalar small_radius, const RealPoint &center, Size m, Size n, const int twist, const NormalsType normals)
 
static Scalars torusMeanCurvatures (const Scalar big_radius, const Scalar small_radius, Size m, Size n, const int twist)
 
static Scalars torusGaussianCurvatures (const Scalar big_radius, const Scalar small_radius, Size m, Size n, const int twist)
 
static Scalars torusFirstPrincipalCurvatures (const Scalar big_radius, const Scalar small_radius, Size m, Size n, const int twist)
 
static Scalars torusSecondPrincipalCurvatures (const Scalar big_radius, const Scalar small_radius, Size m, Size n, const int twist)
 
static RealVectors torusFirstPrincipalDirections (const Scalar big_radius, const Scalar small_radius, Size m, Size n, const int twist)
 
static RealVectors torusSecondPrincipalDirections (const Scalar big_radius, const Scalar small_radius, Size m, Size n, const int twist)
 

Static Public Attributes

static const Dimension dimension = RealPoint::dimension
 

Detailed Description

template<typename TRealPoint, typename TRealVector>
struct DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >

Aim: An helper class for building classical meshes.

Description of template class 'SurfaceMeshHelper'

Template Parameters
TRealPointan arbitrary model of RealPoint.
TRealVectoran arbitrary model of RealVector.
Examples
shapes/exampleSurfaceMesh.cpp.

Definition at line 63 of file SurfaceMeshHelper.h.

Member Typedef Documentation

◆ Faces

template<typename TRealPoint , typename TRealVector >
typedef SurfaceMesh::Faces DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::Faces

Definition at line 78 of file SurfaceMeshHelper.h.

◆ Index

template<typename TRealPoint , typename TRealVector >
typedef SurfaceMesh::Index DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::Index

Definition at line 76 of file SurfaceMeshHelper.h.

◆ RealPoint

template<typename TRealPoint , typename TRealVector >
typedef TRealPoint DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::RealPoint

Definition at line 65 of file SurfaceMeshHelper.h.

◆ RealVector

template<typename TRealPoint , typename TRealVector >
typedef TRealVector DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::RealVector

Definition at line 66 of file SurfaceMeshHelper.h.

◆ RealVectors

template<typename TRealPoint , typename TRealVector >
typedef std::vector<RealVector> DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::RealVectors

Definition at line 74 of file SurfaceMeshHelper.h.

◆ Scalar

template<typename TRealPoint , typename TRealVector >
typedef RealVector::Component DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::Scalar

Definition at line 72 of file SurfaceMeshHelper.h.

◆ Scalars

template<typename TRealPoint , typename TRealVector >
typedef std::vector<Scalar> DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::Scalars

Definition at line 73 of file SurfaceMeshHelper.h.

◆ Self

template<typename TRealPoint , typename TRealVector >
typedef SurfaceMeshHelper< RealPoint, RealVector > DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::Self

Definition at line 67 of file SurfaceMeshHelper.h.

◆ Size

template<typename TRealPoint , typename TRealVector >
typedef SurfaceMesh::Size DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::Size

Definition at line 75 of file SurfaceMeshHelper.h.

◆ SurfaceMesh

template<typename TRealPoint , typename TRealVector >
typedef DGtal::SurfaceMesh< RealPoint, RealVector > DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::SurfaceMesh

Definition at line 71 of file SurfaceMeshHelper.h.

◆ Vertices

template<typename TRealPoint , typename TRealVector >
typedef SurfaceMesh::Vertices DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::Vertices

Definition at line 77 of file SurfaceMeshHelper.h.

Member Enumeration Documentation

◆ NormalsType

template<typename TRealPoint , typename TRealVector >
enum DGtal::SurfaceMeshHelper::NormalsType
strong

Enum type for specifying if the mesh should have after construction: NO_NORMALS no normals, VERTEX_NORMALS the normals at each vertex, FACE_NORMALS the normals at each face.

Enumerator
NO_NORMALS 
VERTEX_NORMALS 
FACE_NORMALS 

Definition at line 83 of file SurfaceMeshHelper.h.

83 { NO_NORMALS, VERTEX_NORMALS, FACE_NORMALS };

Member Function Documentation

◆ BOOST_STATIC_ASSERT()

template<typename TRealPoint , typename TRealVector >
DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::BOOST_STATIC_ASSERT ( (dimension==3)  )

◆ lanternFirstPrincipalCurvatures()

template<typename TRealPoint , typename TRealVector >
static Scalars DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::lanternFirstPrincipalCurvatures ( const Scalar  radius,
Size  m,
Size  n 
)
static

Returns the first principal curvature at each vertex of a Schwarz lantern of given parameters with m latitudes and n longitudes.

Parameters
[in]radiusthe radius of the lantern.
[in]mthe number of latitudes, minimum is 2.
[in]nthe number of longitudes, minimum is 3.
Returns
the first principal curvature at each vertex (zero).

◆ lanternFirstPrincipalDirections()

template<typename TRealPoint , typename TRealVector >
static RealVectors DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::lanternFirstPrincipalDirections ( const Scalar  radius,
Size  m,
Size  n 
)
static

Returns the first principal direction at each vertex of a Schwarz lantern of given parameters with m latitudes and n longitudes.

Parameters
[in]radiusthe radius of the lantern.
[in]mthe number of latitudes, minimum is 2.
[in]nthe number of longitudes, minimum is 3.
Returns
the first principal direction at each vertex (z-axis).

◆ lanternGaussianCurvatures()

template<typename TRealPoint , typename TRealVector >
static Scalars DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::lanternGaussianCurvatures ( const Scalar  radius,
Size  m,
Size  n 
)
static

Returns the Gaussian curvature at each vertex of a Schwarz lantern of given parameters with m latitudes and n longitudes.

Parameters
[in]radiusthe radius of the lantern.
[in]mthe number of latitudes, minimum is 2.
[in]nthe number of longitudes, minimum is 3.
Returns
the Gaussian curvature at each vertex.

◆ lanternMeanCurvatures()

template<typename TRealPoint , typename TRealVector >
static Scalars DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::lanternMeanCurvatures ( const Scalar  radius,
Size  m,
Size  n 
)
static

Returns the mean curvature at each vertex of a Schwarz lantern of given parameters with m latitudes and n longitudes.

Parameters
[in]radiusthe radius of the lantern.
[in]mthe number of latitudes, minimum is 2.
[in]nthe number of longitudes, minimum is 3.
Returns
the mean curvature at each vertex.

◆ lanternSecondPrincipalCurvatures()

template<typename TRealPoint , typename TRealVector >
static Scalars DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::lanternSecondPrincipalCurvatures ( const Scalar  radius,
Size  m,
Size  n 
)
static

Returns the second principal curvature at each vertex of a Schwarz lantern of given parameters with m latitudes and n longitudes.

Parameters
[in]radiusthe radius of the lantern.
[in]mthe number of latitudes, minimum is 2.
[in]nthe number of longitudes, minimum is 3.
Returns
the second principal curvature at each vertex (1/radius).

◆ lanternSecondPrincipalDirections()

template<typename TRealPoint , typename TRealVector >
static RealVectors DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::lanternSecondPrincipalDirections ( const Scalar  radius,
Size  m,
Size  n 
)
static

Returns the second principal direction at each vertex of a Schwarz lantern of given parameters with m latitudes and n longitudes.

Parameters
[in]radiusthe radius of the lantern.
[in]mthe number of latitudes, minimum is 2.
[in]nthe number of longitudes, minimum is 3.
Returns
the second principal direction at each vertex (xy-plane).

◆ makeLantern()

template<typename TRealPoint , typename TRealVector >
static SurfaceMesh DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::makeLantern ( const Scalar  radius,
const Scalar  height,
const RealPoint center,
Size  m,
Size  n,
const NormalsType  normals 
)
static

Builds a surface mesh representing a Schwarz lantern with m latitudes and n longitudes.

Parameters
[in]radiusthe radius of the lantern.
[in]heightthe height of the lantern.
[in]centerthe center of the lantern.
[in]mthe number of latitudes, minimum is 2.
[in]nthe number of longitudes, minimum is 3.
[in]normalsspecifies built-time normals of the output mesh: NO_NORMALS no normals, VERTEX_NORMALS the normals at each vertex, FACE_NORMALS the normals at each face.
Returns
the corresponding surface mesh.

◆ makeSphere()

template<typename TRealPoint , typename TRealVector >
static SurfaceMesh DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::makeSphere ( const Scalar  radius,
const RealPoint center,
Size  m,
Size  n,
NormalsType  normals 
)
static

Builds a surface mesh representing a sphere of given parameters with m latitudes (poles excluded) and n longitudes.

Parameters
[in]radiusthe radius of the sphere.
[in]centerthe center of the sphere.
[in]mthe number of latitudes (poles excepted), minimum is 1.
[in]nthe number of longitudes, minimum is 3.
[in]normalsspecifies built-time normals of the output mesh: NO_NORMALS no normals, VERTEX_NORMALS the normals at each vertex, FACE_NORMALS the normals at each face.
Returns
the corresponding surface mesh.

◆ makeTorus()

template<typename TRealPoint , typename TRealVector >
static SurfaceMesh DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::makeTorus ( const Scalar  big_radius,
const Scalar  small_radius,
const RealPoint center,
Size  m,
Size  n,
const int  twist,
const NormalsType  normals 
)
static

Builds a surface mesh representing a torus with m latitudes and n longitudes.

Parameters
[in]big_radiusthe big radius of the torus.
[in]small_radiusthe small radius of the torus.
[in]centerthe center of the torus.
[in]mthe number of latitudes, minimum is 3.
[in]nthe number of longitudes, minimum is 3.
[in]twistthe integer shift when visiting a whole parallel: 0 is a natural torus parameterization, +n or -n makes the visitor arriving on another parallel after one turn.
[in]normalsspecifies built-time normals of the output mesh: NO_NORMALS no normals, VERTEX_NORMALS the normals at each vertex, FACE_NORMALS the normals at each face.
Returns
the corresponding surface mesh.

◆ sphereFirstPrincipalCurvatures()

template<typename TRealPoint , typename TRealVector >
static Scalars DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::sphereFirstPrincipalCurvatures ( const Scalar  radius,
Size  m,
Size  n 
)
static

Returns the first principal curvature at each vertex of a sphere of given parameters with m latitudes (poles excluded) and n longitudes.

Parameters
[in]radiusthe radius of the sphere.
[in]mthe number of latitudes (poles excepted), minimum is 1.
[in]nthe number of longitudes, minimum is 3.
Returns
the first principal curvature at each vertex.

◆ sphereFirstPrincipalDirections()

template<typename TRealPoint , typename TRealVector >
static RealVectors DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::sphereFirstPrincipalDirections ( const Scalar  radius,
Size  m,
Size  n 
)
static

Returns the first principal direction at each vertex of a sphere of given parameters with m latitudes (poles excluded) and n longitudes.

Parameters
[in]radiusthe radius of the sphere.
[in]mthe number of latitudes (poles excepted), minimum is 1.
[in]nthe number of longitudes, minimum is 3.
Returns
the first principal direction at each vertex (umbilic, any tangent direction is ok).

◆ sphereGaussianCurvatures()

template<typename TRealPoint , typename TRealVector >
static Scalars DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::sphereGaussianCurvatures ( const Scalar  radius,
Size  m,
Size  n 
)
static

Returns the Gaussian curvature at each vertex of a sphere of given parameters with m latitudes (poles excluded) and n longitudes.

Parameters
[in]radiusthe radius of the sphere.
[in]mthe number of latitudes (poles excepted), minimum is 1.
[in]nthe number of longitudes, minimum is 3.
Returns
the Gaussian curvature at each vertex.

◆ sphereMeanCurvatures()

template<typename TRealPoint , typename TRealVector >
static Scalars DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::sphereMeanCurvatures ( const Scalar  radius,
Size  m,
Size  n 
)
static

Returns the mean curvature at each vertex of a sphere of given parameters with m latitudes (poles excluded) and n longitudes.

Parameters
[in]radiusthe radius of the sphere.
[in]mthe number of latitudes (poles excepted), minimum is 1.
[in]nthe number of longitudes, minimum is 3.
Returns
the mean curvature at each vertex.

◆ sphereSecondPrincipalCurvatures()

template<typename TRealPoint , typename TRealVector >
static Scalars DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::sphereSecondPrincipalCurvatures ( const Scalar  radius,
Size  m,
Size  n 
)
static

Returns the second principal curvature at each vertex of a sphere of given parameters with m latitudes (poles excluded) and n longitudes.

Parameters
[in]radiusthe radius of the sphere.
[in]mthe number of latitudes (poles excepted), minimum is 1.
[in]nthe number of longitudes, minimum is 3.
Returns
the second principal curvature at each vertex.

◆ sphereSecondPrincipalDirections()

template<typename TRealPoint , typename TRealVector >
static RealVectors DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::sphereSecondPrincipalDirections ( const Scalar  radius,
Size  m,
Size  n 
)
static

Returns the second principal direction at each vertex of a sphere of given parameters with m latitudes (poles excluded) and n longitudes.

Parameters
[in]radiusthe radius of the sphere.
[in]mthe number of latitudes (poles excepted), minimum is 1.
[in]nthe number of longitudes, minimum is 3.
Returns
the second principal direction at each vertex (umbilic, any tangent direction is ok).

◆ torusFirstPrincipalCurvatures()

template<typename TRealPoint , typename TRealVector >
static Scalars DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::torusFirstPrincipalCurvatures ( const Scalar  big_radius,
const Scalar  small_radius,
Size  m,
Size  n,
const int  twist 
)
static

Returns the first principal curvature at each vertex of a torus of given parameters with m latitudes and n longitudes.

Parameters
[in]big_radiusthe big radius of the torus.
[in]small_radiusthe small radius of the torus.
[in]mthe number of latitudes, minimum is 3.
[in]nthe number of longitudes, minimum is 3.
[in]twistthe integer shift when visiting a whole parallel: 0 is a natural torus parameterization, +n or -n makes the visitor arriving on another parallel after one turn.
Returns
the first principal curvature at each vertex.

◆ torusFirstPrincipalDirections()

template<typename TRealPoint , typename TRealVector >
static RealVectors DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::torusFirstPrincipalDirections ( const Scalar  big_radius,
const Scalar  small_radius,
Size  m,
Size  n,
const int  twist 
)
static

Returns the first principal direction at each vertex of a torus of given parameters with m latitudes and n longitudes.

Parameters
[in]big_radiusthe big radius of the torus.
[in]small_radiusthe small radius of the torus.
[in]mthe number of latitudes, minimum is 3.
[in]nthe number of longitudes, minimum is 3.
[in]twistthe integer shift when visiting a whole parallel: 0 is a natural torus parameterization, +n or -n makes the visitor arriving on another parallel after one turn.
Returns
the first principal direction at each vertex (in xy-plane).

◆ torusGaussianCurvatures()

template<typename TRealPoint , typename TRealVector >
static Scalars DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::torusGaussianCurvatures ( const Scalar  big_radius,
const Scalar  small_radius,
Size  m,
Size  n,
const int  twist 
)
static

Returns the Gaussian curvature at each vertex of a torus of given parameters with m latitudes and n longitudes.

Parameters
[in]big_radiusthe big radius of the torus.
[in]small_radiusthe small radius of the torus.
[in]mthe number of latitudes, minimum is 3.
[in]nthe number of longitudes, minimum is 3.
[in]twistthe integer shift when visiting a whole parallel: 0 is a natural torus parameterization, +n or -n makes the visitor arriving on another parallel after one turn.
Returns
the Gaussian curvature at each vertex.

◆ torusMeanCurvatures()

template<typename TRealPoint , typename TRealVector >
static Scalars DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::torusMeanCurvatures ( const Scalar  big_radius,
const Scalar  small_radius,
Size  m,
Size  n,
const int  twist 
)
static

Returns the mean curvature at each vertex of a torus of given parameters with m latitudes and n longitudes.

Parameters
[in]big_radiusthe big radius of the torus.
[in]small_radiusthe small radius of the torus.
[in]mthe number of latitudes, minimum is 3.
[in]nthe number of longitudes, minimum is 3.
[in]twistthe integer shift when visiting a whole parallel: 0 is a natural torus parameterization, +n or -n makes the visitor arriving on another parallel after one turn.
Returns
the mean curvature at each vertex.

◆ torusSecondPrincipalCurvatures()

template<typename TRealPoint , typename TRealVector >
static Scalars DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::torusSecondPrincipalCurvatures ( const Scalar  big_radius,
const Scalar  small_radius,
Size  m,
Size  n,
const int  twist 
)
static

Returns the second principal curvature at each vertex of a torus of given parameters with m latitudes and n longitudes.

Parameters
[in]big_radiusthe big radius of the torus.
[in]small_radiusthe small radius of the torus.
[in]mthe number of latitudes, minimum is 3.
[in]nthe number of longitudes, minimum is 3.
[in]twistthe integer shift when visiting a whole parallel: 0 is a natural torus parameterization, +n or -n makes the visitor arriving on another parallel after one turn.
Returns
the second principal curvature at each vertex.

◆ torusSecondPrincipalDirections()

template<typename TRealPoint , typename TRealVector >
static RealVectors DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::torusSecondPrincipalDirections ( const Scalar  big_radius,
const Scalar  small_radius,
Size  m,
Size  n,
const int  twist 
)
static

Returns the second principal direction at each vertex of a torus of given parameters with m latitudes and n longitudes.

Parameters
[in]big_radiusthe big radius of the torus.
[in]small_radiusthe small radius of the torus.
[in]mthe number of latitudes, minimum is 3.
[in]nthe number of longitudes, minimum is 3.
[in]twistthe integer shift when visiting a whole parallel: 0 is a natural torus parameterization, +n or -n makes the visitor arriving on another parallel after one turn.
Returns
the second principal direction at each vertex (in meridian-sliced plane).

Field Documentation

◆ dimension

template<typename TRealPoint , typename TRealVector >
const Dimension DGtal::SurfaceMeshHelper< TRealPoint, TRealVector >::dimension = RealPoint::dimension
static

Definition at line 68 of file SurfaceMeshHelper.h.


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