DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
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 
75  typedef typename TParametricShape::RealPoint RealPoint;
76 
78  typedef double Quantity;
79 
85 
86 
93 
94 
99 
100 
101  // ----------------------- Interface --------------------------------------
102  public:
103 
111  {
112  myShape = other.myShape;
113  return *this;
114  }
115 
116 
124  {
125  ASSERT(myShape);
126 
127  double t = myShape->parameter( aPoint );
128  return myShape->curvature( t );
129  }
130 
131 
132  // ------------------------- Private Datas --------------------------------
133  private:
134 
137 
138  // ------------------------- Internals ------------------------------------
139  private:
140 
141  }; // end of class ParametricShapeCurvatureFunctor
142 
143 } // namespace DGtal
144 
145  //
147 
148 #endif // !defined ParametricShapeCurvatureFunctor_h
149 
150 #undef ParametricShapeCurvatureFunctor_RECURSES
151 #endif // else defined(ParametricShapeCurvatureFunctor_RECURSES)