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>
74 typedef typename TParametricShape::RealPoint
RealPoint;
75 typedef typename TParametricShape::Point
Point;
76 typedef typename TParametricShape::Point
Vector;
77 typedef typename Point::Coordinate
Integer;
133 unsigned int nbSamples = (
unsigned int) ceil( n*100 );
136 double t =
myShape->parameter( aFirstPoint );
137 double t2 =
myShape->parameter( aSecondPoint );
138 return myShape->arclength (t,t2,nbSamples);
155 unsigned int nbSamples = (
unsigned int) ceil( n*100 );
176 #endif // !defined ParametricShapeArcLengthFunctor_h
178 #undef ParametricShapeArcLengthFunctor_RECURSES
179 #endif // else defined(ParametricShapeArcLengthFunctor_RECURSES)