DGtal  1.5.beta
C3DParametricCurve.h
1 
17 #pragma once
18 
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>
88 {
89  // ----------------------- Concept checks ------------------------------
90 public:
91  typedef typename T::Space Space;
92  typedef typename T::RealPoint RealPoint;
93  typedef typename T::Point Point;
95  BOOST_STATIC_ASSERT(( Space::dimension == 3 ));
96  // check the presence of data members, operators and methods with
98  {
99  // check const methods.
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 Datas --------------------------------
108 protected:
109  T self;
112  double c;
113 
114  // ------------------------- Internals ------------------------------------
115 private:
116 
117 }; // end of concept 3DParametricCurve
118 
119 
120 
122 // class 3DParametricCurveDecorator
154 template <typename T>
156 {
157  // ----------------------- Concept checks ------------------------------
158 public:
159  // check the presence of data members, operators and methods with
161  {
162  // check const methods.
164  }
166  {
168  }
169  // ------------------------- Private Datas --------------------------------
170 protected:
171  T self;
172  typename T::TypeCurve curve;
173  // ------------------------- Private Datas --------------------------------
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)
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117
DGtal is the top-level namespace which contains all DGtal functions and types.
BOOST_CONCEPT_USAGE(C3DParametricCurveDecorator)
BOOST_STATIC_ASSERT((Space::dimension==3))
BOOST_CONCEPT_ASSERT((concepts::CSpace< Space >))
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines.
Definition: CSpace.h:106
MyPointD Point
Definition: testClone2.cpp:383
PointVector< 3, double > RealPoint