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
shapes
implicit
ImplicitPolynomial3Shape.h
1
17
#pragma once
18
31
#if defined(ImplicitPolynomial3Shape_RECURSES)
32
#error Recursive header files inclusion detected in ImplicitPolynomial3Shape.h
33
#else // defined(ImplicitPolynomial3Shape_RECURSES)
34
35
#define ImplicitPolynomial3Shape_RECURSES
36
37
#if !defined ImplicitPolynomial3Shape_h
38
39
#define ImplicitPolynomial3Shape_h
40
42
// Inclusions
43
#include <iostream>
44
#include "DGtal/base/Common.h"
45
#include "DGtal/base/BasicFunctors.h"
46
#include "DGtal/base/CPredicate.h"
47
#include "DGtal/kernel/NumberTraits.h"
48
#include "DGtal/math/MPolynomial.h"
49
#include "DGtal/shapes/implicit/CImplicitFunction.h"
51
52
namespace
DGtal
53
{
54
56
66
template
<
typename
TSpace >
67
class
ImplicitPolynomial3Shape
68
{
69
70
public
:
71
typedef
ImplicitPolynomial3Shape<TSpace>
Self
;
72
typedef
TSpace
Space
;
73
typedef
typename
Space::RealPoint
RealPoint
;
74
typedef
typename
Space::RealVector
RealVector
;
75
typedef
typename
RealPoint::Coordinate
Ring
;
76
typedef
typename
Space::Integer
Integer
;
77
typedef
MPolynomial< 3, Ring >
Polynomial3
;
78
typedef
Ring
Value
;
79
80
BOOST_STATIC_ASSERT
(( Space::dimension == 3 ));
81
88
ImplicitPolynomial3Shape
(
const
Polynomial3
& poly );
89
95
ImplicitPolynomial3Shape
&
operator=
(
const
ImplicitPolynomial3Shape
& other );
96
100
~ImplicitPolynomial3Shape
();
101
108
void
init
(
const
Polynomial3
& poly );
109
110
// ----------------------- Interface --------------------------------------
111
public
:
112
117
double
operator()
(
const
RealPoint
&aPoint)
const
;
118
123
bool
isInside
(
const
RealPoint
&aPoint)
const
;
124
131
Orientation
orientation
(
const
RealPoint
&aPoint)
const
;
132
137
inline
138
RealVector
gradient
(
const
RealPoint
&aPoint )
const
;
139
140
// ------------------------------------------------------------ Added by Anis Benyoub
141
152
inline
153
double
meanCurvature
(
const
RealPoint
&aPoint )
const
;
154
155
163
inline
164
double
gaussianCurvature
(
const
RealPoint
&aPoint )
const
;
165
179
inline
180
RealPoint
nearestPoint
(
const
RealPoint
&aPoint,
181
const
double
accuracy,
182
const
int
maxIter ,
183
const
double
gamma )
const
;
184
185
186
187
// ----------------------- Interface --------------------------------------
188
public
:
189
194
void
selfDisplay
( std::ostream & out )
const
;
195
200
bool
isValid
()
const
;
201
202
// ------------------------- Protected Datas ------------------------------
203
private
:
204
// ------------------------- Private Datas --------------------------------
205
private
:
207
Polynomial3
myPolynomial
;
208
209
// Partial deriatives
210
Polynomial3
myFx
;
211
Polynomial3
myFy
;
212
Polynomial3
myFz
;
213
214
Polynomial3
myFxx
;
215
Polynomial3
myFxy
;
216
Polynomial3
myFxz
;
217
218
Polynomial3
myFyx
;
219
Polynomial3
myFyy
;
220
Polynomial3
myFyz
;
221
222
Polynomial3
myFzx
;
223
Polynomial3
myFzy
;
224
Polynomial3
myFzz
;
225
226
227
// Precomputed Polynoms useful for curvature computations
228
Polynomial3
myUpPolynome
;
229
Polynomial3
myLowPolynome
;
230
231
232
// ------------------------- Hidden services ------------------------------
233
protected
:
234
239
ImplicitPolynomial3Shape
();
240
241
private
:
242
243
244
};
// end of class ImplicitPolynomial3Shape
245
246
253
template
<
typename
T>
254
std::ostream &
255
operator<< ( std::ostream & out, const ImplicitPolynomial3Shape<T> & object );
256
257
}
// namespace DGtal
258
259
261
// Includes inline functions.
262
#include "DGtal/shapes/implicit/ImplicitPolynomial3Shape.ih"
263
264
// //
266
267
#endif // !defined ImplicitPolynomial3Shape_h
268
269
#undef ImplicitPolynomial3Shape_RECURSES
270
#endif // else defined(ImplicitPolynomial3Shape_RECURSES)
Generated on Wed Dec 19 2012 19:10:27 for DGtal by
1.8.1.1