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;
77 typedef typename Point::Coordinate
Integer;
125 Quantity
operator()(
const RealPoint &aFirstPoint,
const RealPoint &aSecondPoint)
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 );
157 return myShape->arclength (0,2*M_PI,nbSamples);
176 #endif // !defined ParametricShapeArcLengthFunctor_h 178 #undef ParametricShapeArcLengthFunctor_RECURSES 179 #endif // else defined(ParametricShapeArcLengthFunctor_RECURSES) ~ParametricShapeArcLengthFunctor()
ParametricShapeArcLengthFunctor()
ParametricShapeArcLengthFunctor(ParametricShape *aShape)
TParametricShape::Point Vector
ParametricShapeArcLengthFunctor & operator=(const ParametricShapeArcLengthFunctor &other)
Quantity operator()(const RealPoint &aFirstPoint, const RealPoint &aSecondPoint)
TParametricShape ParametricShape
Type of parametric shape.
ParametricShape * myShape
Copy of the implicit shape.
TParametricShape::Point Point
Aim: implements a functor that estimates the arc length of a paramtric curve.
Point::Coordinate Integer
Aim: The traits class for all models of Cinteger.
DGtal is the top-level namespace which contains all DGtal functions and types.
double Quantity
Type of the functor output.
TParametricShape::RealPoint RealPoint
Type of const iterator on points.
boost::int32_t int32_t
signed 32-bit integer.