DGtal
0.6.devel
Main Page
Related Pages
Modules
Namespaces
Data Structures
Examples
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
src
DGtal
geometry
curves
estimation
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>
65
class
ParametricShapeCurvatureFunctor
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
ParametricShapeCurvatureFunctor
(){}
85
86
92
ParametricShapeCurvatureFunctor
(
ParametricShape
*aShape):
myShape
(aShape) {};
93
94
98
~ParametricShapeCurvatureFunctor
(){}
99
100
101
// ----------------------- Interface --------------------------------------
102
public
:
103
110
ParametricShapeCurvatureFunctor
&
operator=
(
const
ParametricShapeCurvatureFunctor
& other )
111
{
112
myShape
= other.
myShape
;
113
return
*
this
;
114
}
115
116
123
Quantity
operator()
(
const
RealPoint
&aPoint)
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
136
ParametricShape
*
myShape
;
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)
Generated on Wed Dec 19 2012 19:10:32 for DGtal by
1.8.1.1