DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
C3DParametricCurve.h
1
16
17
#pragma once
18
30
31
#if defined(C3DParametricCurve_RECURSES)
32
#error Recursive header files inclusion detected in ParametricCurve.h
33
#else
// defined(C3DParametricCurve_RECURSES)
35
#define C3DParametricCurve_RECURSES
36
37
#if !defined C3DParametricCurve_h
39
#define C3DParametricCurve_h
40
42
// Inclusions
43
#include <iostream>
44
#include "DGtal/base/Common.h"
45
#include "DGtal/kernel/CSpace.h"
47
48
namespace
DGtal
49
{
50
namespace
concepts
51
{
52
54
// class 3DParametricCurve
86
template
<
typename
T>
87
struct
C3DParametricCurve
88
{
89
// ----------------------- Concept checks ------------------------------
90
public
:
91
typedef
typename
T::Space
Space
;
92
typedef
typename
T::RealPoint
RealPoint
;
93
typedef
typename
T::Point
Point
;
94
BOOST_CONCEPT_ASSERT
(( concepts::CSpace <Space> ));
95
BOOST_STATIC_ASSERT
((
Space::dimension
== 3 ));
96
// check the presence of data members, operators and methods with
97
BOOST_CONCEPT_USAGE
(
C3DParametricCurve
)
98
{
99
// check const methods.
100
checkConstConstraints
();
101
}
102
virtual
void
checkConstConstraints
()
const
103
{
104
ConceptUtils::sameType
(
x
,
self
.xp ( 0.1f ) );
105
ConceptUtils::sameType
(
x
,
self
.x ( 0.1f ) );
106
}
107
// ------------------------- Private Data --------------------------------
108
protected
:
109
T
self
;
110
RealPoint
x
;
111
Point
y
;
112
double
c
;
113
114
// ------------------------- Internals ------------------------------------
115
private
:
116
117
};
// end of concept 3DParametricCurve
118
119
120
122
// class 3DParametricCurveDecorator
154
template
<
typename
T>
155
struct
C3DParametricCurveDecorator
:
public
C3DParametricCurve
< T >
156
{
157
// ----------------------- Concept checks ------------------------------
158
public
:
159
// check the presence of data members, operators and methods with
160
BOOST_CONCEPT_USAGE
(
C3DParametricCurveDecorator
)
161
{
162
// check const methods.
163
checkConstConstraints
();
164
}
165
void
checkConstConstraints
()
const
166
{
167
ConceptUtils::sameType
(
curve
,
self
.curve );
168
}
169
// ------------------------- Private Data --------------------------------
170
protected
:
171
T
self
;
172
typename
T::TypeCurve
curve
;
173
// ------------------------- Private Data --------------------------------
174
// ------------------------- Internals ------------------------------------
175
};
// end of concept 3DParametricCurve
176
177
}
// namespace concepts
178
}
// namespace DGtal
179
180
// //
182
183
#endif
// !defined ParametricCurve_h
184
185
#undef C3DParametricCurve_RECURSES
186
#endif
// else defined(ParametricCurve_RECURSES)
DGtal::SpaceND< 3, Integer >::dimension
static const Dimension dimension
Definition
SpaceND.h:132
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition
ConceptUtils.h:117
DGtal::concepts
Aim: Gathers several functions useful for concept checks.
Definition
CPositiveIrreducibleFraction.h:54
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::concepts::C3DParametricCurveDecorator
Aim:
Definition
C3DParametricCurve.h:156
DGtal::concepts::C3DParametricCurveDecorator::curve
T::TypeCurve curve
Definition
C3DParametricCurve.h:172
DGtal::concepts::C3DParametricCurveDecorator::checkConstConstraints
void checkConstConstraints() const
Definition
C3DParametricCurve.h:165
DGtal::concepts::C3DParametricCurveDecorator::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(C3DParametricCurveDecorator)
Definition
C3DParametricCurve.h:160
DGtal::concepts::C3DParametricCurveDecorator::self
T self
Definition
C3DParametricCurve.h:171
DGtal::concepts::C3DParametricCurve
Aim:
Definition
C3DParametricCurve.h:88
DGtal::concepts::C3DParametricCurve::y
Point y
Definition
C3DParametricCurve.h:111
DGtal::concepts::C3DParametricCurve::x
RealPoint x
Definition
C3DParametricCurve.h:110
DGtal::concepts::C3DParametricCurve::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT((Space::dimension==3))
DGtal::concepts::C3DParametricCurve::Space
T::Space Space
Definition
C3DParametricCurve.h:91
DGtal::concepts::C3DParametricCurve::self
T self
Definition
C3DParametricCurve.h:109
DGtal::concepts::C3DParametricCurve::c
double c
Definition
C3DParametricCurve.h:112
DGtal::concepts::C3DParametricCurve::RealPoint
T::RealPoint RealPoint
Definition
C3DParametricCurve.h:92
DGtal::concepts::C3DParametricCurve::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(C3DParametricCurve)
Definition
C3DParametricCurve.h:97
DGtal::concepts::C3DParametricCurve::Point
T::Point Point
Definition
C3DParametricCurve.h:93
DGtal::concepts::C3DParametricCurve::checkConstConstraints
virtual void checkConstConstraints() const
Definition
C3DParametricCurve.h:102
DGtal::concepts::C3DParametricCurve::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CSpace< Space >))
src
DGtal
geometry
curves
parametric
C3DParametricCurve.h
Generated on
for DGtal by
1.18.0