DGtal  0.9.4beta
Public Types | Public Member Functions | Private Attributes
DGtal::ParametricShapeCurvatureFunctor< TParametricShape > Class Template Reference

#include <DGtal/geometry/curves/estimation/ParametricShapeCurvatureFunctor.h>

Public Types

typedef TParametricShape ParametricShape
 
typedef TParametricShape::RealPoint RealPoint
 
typedef double Quantity
 

Public Member Functions

 ParametricShapeCurvatureFunctor ()
 
 ParametricShapeCurvatureFunctor (ParametricShape *aShape)
 
 ~ParametricShapeCurvatureFunctor ()
 
ParametricShapeCurvatureFunctoroperator= (const ParametricShapeCurvatureFunctor &other)
 
Quantity operator() (const RealPoint &aPoint)
 

Private Attributes

ParametricShapemyShape
 

Detailed Description

template<typename TParametricShape>
class DGtal::ParametricShapeCurvatureFunctor< TParametricShape >

Aim: implements a functor that computes the curvature at a given point of a parametric shape.

Description of template class 'ParametricShapeCurvatureFunctor'

Note
Curvature is given by \(\kappa(t) = \frac{x'y''-y'x''}{(x'^2+y'^2)^{3/2}}\)
Template Parameters
TParametricShapea model of parametric shape.

Definition at line 65 of file ParametricShapeCurvatureFunctor.h.

Member Typedef Documentation

template<typename TParametricShape >
typedef TParametricShape DGtal::ParametricShapeCurvatureFunctor< TParametricShape >::ParametricShape

Type of parametric shape.

Definition at line 72 of file ParametricShapeCurvatureFunctor.h.

template<typename TParametricShape >
typedef double DGtal::ParametricShapeCurvatureFunctor< TParametricShape >::Quantity

Type of the functor output.

Definition at line 78 of file ParametricShapeCurvatureFunctor.h.

template<typename TParametricShape >
typedef TParametricShape::RealPoint DGtal::ParametricShapeCurvatureFunctor< TParametricShape >::RealPoint

Type of points.

Definition at line 75 of file ParametricShapeCurvatureFunctor.h.

Constructor & Destructor Documentation

template<typename TParametricShape >
DGtal::ParametricShapeCurvatureFunctor< TParametricShape >::ParametricShapeCurvatureFunctor ( )
inline

Constructor. Forbidden by default (protected to avoid g++ warnings).

Definition at line 84 of file ParametricShapeCurvatureFunctor.h.

84 {}
template<typename TParametricShape >
DGtal::ParametricShapeCurvatureFunctor< TParametricShape >::ParametricShapeCurvatureFunctor ( ParametricShape aShape)
inline

Constructor.

Parameters
aShapethe input shape.

Definition at line 92 of file ParametricShapeCurvatureFunctor.h.

92 : myShape(aShape) {};
ParametricShape * myShape
Copy of the implicit shape.
template<typename TParametricShape >
DGtal::ParametricShapeCurvatureFunctor< TParametricShape >::~ParametricShapeCurvatureFunctor ( )
inline

Destructor.

Definition at line 98 of file ParametricShapeCurvatureFunctor.h.

98 {}

Member Function Documentation

template<typename TParametricShape >
Quantity DGtal::ParametricShapeCurvatureFunctor< TParametricShape >::operator() ( const RealPoint aPoint)
inline

Computes the curvature at [aPoint]

Parameters
aPointthe point at which the curvature is computed.
Returns
the curvature at [aPoint].

Definition at line 123 of file ParametricShapeCurvatureFunctor.h.

References DGtal::ParametricShapeCurvatureFunctor< TParametricShape >::myShape.

124  {
125  ASSERT(myShape);
126 
127  double t = myShape->parameter( aPoint );
128  return myShape->curvature( t );
129  }
ParametricShape * myShape
Copy of the implicit shape.
template<typename TParametricShape >
ParametricShapeCurvatureFunctor& DGtal::ParametricShapeCurvatureFunctor< TParametricShape >::operator= ( const ParametricShapeCurvatureFunctor< TParametricShape > &  other)
inline

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'. Forbidden by default.

Definition at line 110 of file ParametricShapeCurvatureFunctor.h.

References DGtal::ParametricShapeCurvatureFunctor< TParametricShape >::myShape.

111  {
112  myShape = other.myShape;
113  return *this;
114  }
ParametricShape * myShape
Copy of the implicit shape.

Field Documentation

template<typename TParametricShape >
ParametricShape* DGtal::ParametricShapeCurvatureFunctor< TParametricShape >::myShape
private

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