DGtal  1.0.0
Knot_5_2.h
1 
17 #pragma once
18 
31 #if defined(Knot_5_2_RECURSES)
32 #error Recursive header files inclusion detected in Knot_5_2.h
33 #else // defined(Knot_5_2_RECURSES)
34 
35 #define Knot_5_2_RECURSES
36 
37 #if !defined Knot_5_2_h
38 
39 #define Knot_5_2_h
40 
42 // Inclusions
43 #include <iostream>
44 #include <cmath>
45 #include "DGtal/base/Common.h"
47 
48 namespace DGtal
49 {
50 
52 // class Knot_5_2
58 template <typename TSpace>
59 class Knot_5_2
60 {
61  // ----------------------- Standard services ------------------------------
62 public:
63  typedef TSpace Space;
64  typedef typename TSpace::RealPoint RealPoint;
65  typedef typename TSpace::Point Point;
66 
70  ~Knot_5_2() {}
71 
78  Knot_5_2 ( long double scale_1, long double scale_2, long double scale_3 );
79 
80 
81  // ----------------------- Interface --------------------------------------
82 public:
83 
89  RealPoint x ( long double t ) const;
90 
96  RealPoint xp ( long double t ) const;
97 
98  static double getPeriod();
99 
100 
105  void selfDisplay ( std::ostream & out ) const;
106 
111  bool isValid() const;
112 
113 
114  // ------------------------- Protected Datas ------------------------------
115 private:
116  // ------------------------- Private Datas --------------------------------
117 private:
118  long double scale[3];
119  // ------------------------- Hidden services ------------------------------
120 protected:
121 
126  Knot_5_2();
127 
128 private:
129 
135  Knot_5_2 ( const Knot_5_2 & other );
136 
143  Knot_5_2 & operator= ( const Knot_5_2 & other );
144 
145 
146  // ------------------------- Internals ------------------------------------
147 private:
148  static constexpr double PERIOD = M_PI * 2.0;
149 
150 }; // end of class Knot_5_2
151 
152 
159 template <typename T>
160 std::ostream&
161 operator<< ( std::ostream & out, const Knot_5_2<T> & object );
162 
163 
164 } // namespace DGtal
165 
166 
168 // Includes inline functions.
169 #if !defined(BUILD_INLINE)
170 #include "DGtal/geometry/curves/parametric/Knot_5_2.ih"
171 #endif
172 
173 
174 // //
176 
177 #endif // !defined Knot_5_2_h
178 
179 #undef Knot_5_2_RECURSES
180 #endif // else defined(Knot_5_2_RECURSES)
TSpace::Point Point
Definition: Knot_5_2.h:65
static double getPeriod()
RealPoint xp(long double t) const
Aim: Implements basic operations that will be used in Point and Vector classes.
Definition: PointVector.h:165
PointVector< 3, double > RealPoint
bool isValid() const
Aim: Implement a parametrized knot 5, 2.
Definition: Knot_5_2.h:59
void selfDisplay(std::ostream &out) const
static constexpr double PERIOD
Definition: Knot_5_2.h:148
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
Knot_5_2 & operator=(const Knot_5_2 &other)
DGtal is the top-level namespace which contains all DGtal functions and types.
MyPointD Point
Definition: testClone2.cpp:383
RealPoint x(long double t) const
TSpace::RealPoint RealPoint
Definition: Knot_5_2.h:64
TSpace Space
Definition: Knot_5_2.h:63