DGtal  1.1.0
ParametricShapeCurvatureFunctor.h
1 
17 #pragma once
18 
33 #if defined(ParametricShapeCurvatureFunctor_RECURSES)
34 #error Recursive header files inclusion detected in ParametricShapeCurvatureFunctor.h
35 #else // defined(ParametricShapeCurvatureFunctor_RECURSES)
36 
37 #define ParametricShapeCurvatureFunctor_RECURSES
38 
39 #if !defined ParametricShapeCurvatureFunctor_h
40 
41 #define ParametricShapeCurvatureFunctor_h
42 
44 // Inclusions
45 #include <iostream>
46 #include "DGtal/base/Common.h"
48 
49 namespace DGtal
50 {
51 
53  // template class ParametricShapeCurvatureFunctor
64  template <typename TParametricShape>
66  {
67 
68  // ----------------------- Standard services ------------------------------
69  public:
70 
72  typedef TParametricShape ParametricShape;
73 
76 
78  typedef double Quantity;
79 
84 
85 
92 
93 
98 
99 
100  // ----------------------- Interface --------------------------------------
101  public:
109 
117  {
118  double t = myShape.parameter( aPoint );
119  return myShape.curvature( t );
120  }
121 
122 
123  // ------------------------- Private Datas --------------------------------
124  private:
125 
128 
129  // ------------------------- Internals ------------------------------------
130  private:
131 
132  }; // end of class ParametricShapeCurvatureFunctor
133 
134 } // namespace DGtal
135 
136  //
138 
139 #endif // !defined ParametricShapeCurvatureFunctor_h
140 
141 #undef ParametricShapeCurvatureFunctor_RECURSES
142 #endif // else defined(ParametricShapeCurvatureFunctor_RECURSES)
DGtal::ParametricShapeCurvatureFunctor::ParametricShapeCurvatureFunctor
ParametricShapeCurvatureFunctor(const ParametricShape &aShape)
Definition: ParametricShapeCurvatureFunctor.h:91
aPoint
const Point aPoint(3, 4)
DGtal::ParametricShapeCurvatureFunctor::RealPoint
TParametricShape::RealPoint RealPoint
Type of points.
Definition: ParametricShapeCurvatureFunctor.h:75
DGtal::ParametricShapeCurvatureFunctor::myShape
const ParametricShape & myShape
Reference of the implicit shape.
Definition: ParametricShapeCurvatureFunctor.h:127
DGtal::ParametricShapeCurvatureFunctor::operator()
Quantity operator()(const RealPoint &aPoint) const
Definition: ParametricShapeCurvatureFunctor.h:116
DGtal::ParametricShapeCurvatureFunctor::operator=
ParametricShapeCurvatureFunctor & operator=(const ParametricShapeCurvatureFunctor &other)=delete
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition: ClosedIntegerHalfPlane.h:49
DGtal::ParametricShapeCurvatureFunctor::ParametricShapeCurvatureFunctor
ParametricShapeCurvatureFunctor()=delete
DGtal::ParametricShapeCurvatureFunctor::Quantity
double Quantity
Type of the functor output.
Definition: ParametricShapeCurvatureFunctor.h:78
DGtal::ParametricShapeCurvatureFunctor::~ParametricShapeCurvatureFunctor
~ParametricShapeCurvatureFunctor()=default
DGtal::ParametricShapeCurvatureFunctor
Aim: implements a functor that computes the curvature at a given point of a parametric shape.
Definition: ParametricShapeCurvatureFunctor.h:66
DGtal::ParametricShapeCurvatureFunctor::ParametricShape
TParametricShape ParametricShape
Type of parametric shape.
Definition: ParametricShapeCurvatureFunctor.h:72
RealPoint
Z2i::RealPoint RealPoint
Definition: testAstroid2D.cpp:46