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
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)
37
38
#define ParametricShapeTangentFunctor_RECURSES
39
40
#if !defined ParametricShapeTangentFunctor_h
41
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>
63
class
ParametricShapeTangentFunctor
64
{
65
66
// ----------------------- Standard services ------------------------------
67
public
:
68
70
typedef
TParametricShape
ParametricShape
;
71
73
typedef
typename
TParametricShape::RealPoint
RealPoint
;
74
76
typedef
typename
TParametricShape::RealPoint
Quantity
;
77
81
ParametricShapeTangentFunctor
(){}
82
83
89
ParametricShapeTangentFunctor
(
ParametricShape
*aShape):
myShape
(aShape) {};
90
91
95
~ParametricShapeTangentFunctor
(){}
96
97
// ----------------------- Interface --------------------------------------
98
public
:
99
106
ParametricShapeTangentFunctor
&
operator=
(
const
ParametricShapeTangentFunctor
& other )
107
{
108
myShape
= other.
myShape
;
109
return
*
this
;
110
}
111
112
119
Quantity
operator()
(
const
RealPoint
&aPoint)
120
{
121
ASSERT(
myShape
);
122
123
double
t =
myShape
->parameter( aPoint );
124
return
myShape
->tangent( t );
125
}
126
127
128
// ------------------------- Private Datas --------------------------------
129
private
:
130
132
ParametricShape
*
myShape
;
133
134
// ------------------------- Internals ------------------------------------
135
private
:
136
137
};
// end of class ParametricShapeTangentFunctor
138
139
}
// namespace DGtal
140
141
//
143
144
#endif // !defined ParametricShapeTangentFunctor_h
145
146
#undef ParametricShapeTangentFunctor_RECURSES
147
#endif // else defined(ParametricShapeTangentFunctor_RECURSES)
Generated on Wed Dec 19 2012 19:10:32 for DGtal by
1.8.1.1