DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Private Attributes
DGtal::ParametricShapeCurvatureFunctor< TParametricShape > Class Template Reference

#include <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:
\(\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.

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

Constructor.

Parameters:
aShapethe input shape.

Definition at line 92 of file ParametricShapeCurvatureFunctor.h.

: myShape(aShape) {};
template<typename TParametricShape >
DGtal::ParametricShapeCurvatureFunctor< TParametricShape >::~ParametricShapeCurvatureFunctor ( )
inline

Destructor.

Definition at line 98 of file ParametricShapeCurvatureFunctor.h.

{}

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.

{
ASSERT(myShape);
double t = myShape->parameter( aPoint );
return myShape->curvature( t );
}
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.

{
myShape = other.myShape;
return *this;
}

Field Documentation

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

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