DGtal  1.4.2
ParametricShapeTangentFunctor.h
1 
17 #pragma once
18 
34 #if defined(ParametricShapeTangentFunctor_RECURSES)
35 #error Recursive header files inclusion detected in ParametricShapeTangentFunctor.h
36 #else // defined(ParametricShapeTangentFunctor_RECURSES)
38 #define ParametricShapeTangentFunctor_RECURSES
39 
40 #if !defined ParametricShapeTangentFunctor_h
42 #define ParametricShapeTangentFunctor_h
43 
45 // Inclusions
46 #include <iostream>
47 #include "DGtal/base/Common.h"
49 
50 namespace DGtal
51 {
52 
54  // template class ParametricShapeTangentFunctor
62  template <typename TParametricShape>
64  {
65 
66  // ----------------------- Standard services ------------------------------
67  public:
68 
70  typedef TParametricShape ParametricShape;
71 
74 
77 
82 
83 
90 
91 
96 
97  // ----------------------- Interface --------------------------------------
98  public:
99 
107 
108 
116  {
117  double t = myShape.parameter( aPoint );
118  return myShape.tangent( t );
119  }
120 
121 
122  // ------------------------- Private Datas --------------------------------
123  private:
124 
127 
128  // ------------------------- Internals ------------------------------------
129  private:
130 
131  }; // end of class ParametricShapeTangentFunctor
132 
133 } // namespace DGtal
134 
135  //
137 
138 #endif // !defined ParametricShapeTangentFunctor_h
139 
140 #undef ParametricShapeTangentFunctor_RECURSES
141 #endif // else defined(ParametricShapeTangentFunctor_RECURSES)
Aim: implements a functor that computes the tangent vector at a given point of a parametric shape.
Quantity operator()(const RealPoint &aPoint) const
TParametricShape::RealPoint Quantity
Type of the functor output.
ParametricShapeTangentFunctor & operator=(const ParametricShapeTangentFunctor &other)=delete
ParametricShapeTangentFunctor(const ParametricShape &aShape)
const ParametricShape & myShape
Reference of the implicit shape.
TParametricShape::RealPoint RealPoint
Type of points.
TParametricShape ParametricShape
Type of parametric shape.
DGtal is the top-level namespace which contains all DGtal functions and types.
const Point aPoint(3, 4)
PointVector< 3, double > RealPoint