DGtal  1.1.0
Public Types | Public Member Functions | Private Attributes
DGtal::functors::ShapeGeometricFunctors::ShapePrincipalCurvaturesAndDirectionsFunctor< TShape > Struct Template Reference

Aim: A functor RealPoint -> (Scalar,Scalar,RealVector,RealVector that returns the principal curvatures and the principal directions as a tuple at given point (k1,k2,d1,d2). More...

#include <DGtal/shapes/ShapeGeometricFunctors.h>

Collaboration diagram for DGtal::functors::ShapeGeometricFunctors::ShapePrincipalCurvaturesAndDirectionsFunctor< TShape >:
[legend]

Public Types

typedef TShape Shape
 
typedef Shape::RealPoint RealPoint
 
typedef Shape::RealVector RealVector
 
typedef RealVector::Component Scalar
 
typedef RealPoint Argument
 
typedef std::tuple< Scalar, Scalar, RealVector, RealVectorQuantity
 
typedef Quantity Value
 

Public Member Functions

 ShapePrincipalCurvaturesAndDirectionsFunctor (ConstAlias< Shape > aShape=0)
 
void attach (ConstAlias< Shape > aShape)
 
Quantity operator() (const RealPoint &p) const
 

Private Attributes

CountedConstPtrOrConstPtr< ShapemyShape
 The shape of interest. More...
 

Detailed Description

template<typename TShape>
struct DGtal::functors::ShapeGeometricFunctors::ShapePrincipalCurvaturesAndDirectionsFunctor< TShape >

Aim: A functor RealPoint -> (Scalar,Scalar,RealVector,RealVector that returns the principal curvatures and the principal directions as a tuple at given point (k1,k2,d1,d2).

Description of template class 'ShapePrincipalCurvaturesAndDirectionsFunctor'

Template Parameters
TShapethe type of the shape where geometric estimation are made. It must have method principalDirections.

Definition at line 499 of file ShapeGeometricFunctors.h.

Member Typedef Documentation

◆ Argument

Definition at line 504 of file ShapeGeometricFunctors.h.

◆ Quantity

Definition at line 505 of file ShapeGeometricFunctors.h.

◆ RealPoint

Definition at line 501 of file ShapeGeometricFunctors.h.

◆ RealVector

Definition at line 502 of file ShapeGeometricFunctors.h.

◆ Scalar

Definition at line 503 of file ShapeGeometricFunctors.h.

◆ Shape

Definition at line 500 of file ShapeGeometricFunctors.h.

◆ Value

Definition at line 506 of file ShapeGeometricFunctors.h.

Constructor & Destructor Documentation

◆ ShapePrincipalCurvaturesAndDirectionsFunctor()

Constructor. A shape may also be attached at construction.

Parameters
aShapethe shape of interest. The alias can be secured if a some counted pointer is handed.

Definition at line 514 of file ShapeGeometricFunctors.h.

515  : myShape( aShape ) {}

Member Function Documentation

◆ attach()

template<typename TShape >
void DGtal::functors::ShapeGeometricFunctors::ShapePrincipalCurvaturesAndDirectionsFunctor< TShape >::attach ( ConstAlias< Shape aShape)
inline

Attach a shape.

Parameters
aShapethe shape of interest. The alias can be secured if a some counted pointer is handed.

Definition at line 523 of file ShapeGeometricFunctors.h.

524  {
525  myShape = aShape;
526  }

References DGtal::functors::ShapeGeometricFunctors::ShapePrincipalCurvaturesAndDirectionsFunctor< TShape >::myShape.

◆ operator()()

template<typename TShape >
Quantity DGtal::functors::ShapeGeometricFunctors::ShapePrincipalCurvaturesAndDirectionsFunctor< TShape >::operator() ( const RealPoint p) const
inline

Map operator RealPoint -> (Scalar,Scalar,RealVector,RealVector) giving the principal curvatures and directions (k1,k2,d1,d2).

Parameters
pany point on the shape.
Returns
the principal curvatures and directions (k1,k2,d1,d2) at point p.

Definition at line 536 of file ShapeGeometricFunctors.h.

537  {
538  Scalar k1, k2;
539  RealVector d1, d2;
540  myShape->principalCurvatures( p, k1, k2 );
541  myShape->principalDirections( p, d1, d2 );
542  return std::make_tuple( k1, k2, d1, d2 );
543  }

References DGtal::functors::ShapeGeometricFunctors::ShapePrincipalCurvaturesAndDirectionsFunctor< TShape >::myShape.

Field Documentation

◆ myShape


The documentation for this struct was generated from the following file:
DGtal::functors::ShapeGeometricFunctors::ShapePrincipalCurvaturesAndDirectionsFunctor::myShape
CountedConstPtrOrConstPtr< Shape > myShape
The shape of interest.
Definition: ShapeGeometricFunctors.h:547
DGtal::PointVector
Aim: Implements basic operations that will be used in Point and Vector classes.
Definition: PointVector.h:593
DGtal::functors::ShapeGeometricFunctors::ShapePrincipalCurvaturesAndDirectionsFunctor::Scalar
RealVector::Component Scalar
Definition: ShapeGeometricFunctors.h:503