34#if defined(ParametricShapeArcLengthFunctor_RECURSES)
35#error Recursive header files inclusion detected in ParametricShapeArcLengthFunctor.h
38#define ParametricShapeArcLengthFunctor_RECURSES
40#if !defined ParametricShapeArcLengthFunctor_h
42#define ParametricShapeArcLengthFunctor_h
47#include "DGtal/base/Common.h"
63 template <
typename TParametricShape>
74 typedef typename TParametricShape::RealPoint
RealPoint;
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 );
162#undef ParametricShapeArcLengthFunctor_RECURSES
Aim: implements a functor that estimates the arc length of a paramtric curve.
Quantity operator()() const
TParametricShape ParametricShape
Type of parametric shape.
ParametricShapeArcLengthFunctor()=delete
ParametricShapeArcLengthFunctor & operator=(const ParametricShapeArcLengthFunctor &other)=delete
const ParametricShape & myShape
Reference of the implicit shape.
Quantity operator()(const RealPoint &aFirstPoint, const RealPoint &aSecondPoint) const
TParametricShape::RealPoint RealPoint
Type of const iterator on points.
ParametricShapeArcLengthFunctor(const ParametricShape &aShape)
~ParametricShapeArcLengthFunctor()=default
double Quantity
Type of the functor output.
DGtal is the top-level namespace which contains all DGtal functions and types.