DGtal 1.3.0
Loading...
Searching...
No Matches
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)
37#define ParametricShapeCurvatureFunctor_RECURSES
38
39#if !defined ParametricShapeCurvatureFunctor_h
41#define ParametricShapeCurvatureFunctor_h
42
44// Inclusions
45#include <iostream>
46#include "DGtal/base/Common.h"
48
49namespace 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
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)
Aim: implements a functor that computes the curvature at a given point of a parametric shape.
TParametricShape ParametricShape
Type of parametric shape.
ParametricShapeCurvatureFunctor & operator=(const ParametricShapeCurvatureFunctor &other)=delete
ParametricShapeCurvatureFunctor(const ParametricShape &aShape)
TParametricShape::RealPoint RealPoint
Type of points.
Quantity operator()(const RealPoint &aPoint) const
const ParametricShape & myShape
Reference of the implicit shape.
DGtal is the top-level namespace which contains all DGtal functions and types.
const Point aPoint(3, 4)