34 #if defined(ParametricShapeArcLengthFunctor_RECURSES)
35 #error Recursive header files inclusion detected in ParametricShapeArcLengthFunctor.h
36 #else // defined(ParametricShapeArcLengthFunctor_RECURSES)
38 #define ParametricShapeArcLengthFunctor_RECURSES
40 #if !defined ParametricShapeArcLengthFunctor_h
42 #define ParametricShapeArcLengthFunctor_h
47 #include "DGtal/base/Common.h"
63 template <
typename TParametricShape>
120 unsigned int nbSamples = (
unsigned int) ceil( n*100 );
123 double t =
myShape.parameter( aFirstPoint );
124 double t2 =
myShape.parameter( aSecondPoint );
125 return myShape.arclength( t, t2, nbSamples );
139 unsigned int nbSamples = (
unsigned int) ceil( n*100 );
141 return myShape.arclength( 0,2*M_PI, nbSamples );
160 #endif // !defined ParametricShapeArcLengthFunctor_h
162 #undef ParametricShapeArcLengthFunctor_RECURSES
163 #endif // else defined(ParametricShapeArcLengthFunctor_RECURSES)
const ParametricShape & myShape
Reference of the implicit shape.
TParametricShape::RealPoint RealPoint
Type of const iterator on points.
double Quantity
Type of the functor output.
ParametricShapeArcLengthFunctor()=delete
~ParametricShapeArcLengthFunctor()=default
Quantity operator()() const
DGtal is the top-level namespace which contains all DGtal functions and types.
ParametricShapeArcLengthFunctor(const ParametricShape &aShape)
ParametricShapeArcLengthFunctor & operator=(const ParametricShapeArcLengthFunctor &other)=delete
Aim: implements a functor that estimates the arc length of a paramtric curve.
Quantity operator()(const RealPoint &aFirstPoint, const RealPoint &aSecondPoint) const
TParametricShape ParametricShape
Type of parametric shape.