DGtal  1.0.0
Knot_4_3.h
1 
17 #pragma once
18 
31 #if defined(Knot_4_3_RECURSES)
32 #error Recursive header files inclusion detected in Knot_4_3.h
33 #else // defined(Knot_4_3_RECURSES)
34 
35 #define Knot_4_3_RECURSES
36 
37 #if !defined Knot_4_3_h
38 
39 #define Knot_4_3_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_4_3
58 template <typename TSpace>
59 class Knot_4_3
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_4_3() {}
71 
78  Knot_4_3 ( 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_4_3();
127 
128 private:
129 
135  Knot_4_3 ( const Knot_4_3 & other );
136 
143  Knot_4_3 & operator= ( const Knot_4_3 & other );
144 
145 
146  // ------------------------- Internals ------------------------------------
147 private:
148  static constexpr double PERIOD = M_PI * 2.0;
149 
150 }; // end of class Knot_4_3
151 
152 
159 template <typename T>
160 std::ostream&
161 operator<< ( std::ostream & out, const Knot_4_3<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_4_3.ih"
171 #endif
172 
173 
174 // //
176 
177 #endif // !defined Knot_4_3_h
178 
179 #undef Knot_4_3_RECURSES
180 #endif // else defined(Knot_4_3_RECURSES)
static double getPeriod()
Aim: Implements basic operations that will be used in Point and Vector classes.
Definition: PointVector.h:165
PointVector< 3, double > RealPoint
static constexpr double PERIOD
Definition: Knot_4_3.h:148
Knot_4_3 & operator=(const Knot_4_3 &other)
TSpace::RealPoint RealPoint
Definition: Knot_4_3.h:64
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
bool isValid() const
void selfDisplay(std::ostream &out) const
DGtal is the top-level namespace which contains all DGtal functions and types.
MyPointD Point
Definition: testClone2.cpp:383
TSpace Space
Definition: Knot_4_3.h:63
TSpace::Point Point
Definition: Knot_4_3.h:65
RealPoint x(long double t) const
Aim: Implement a parametrized knot 4, 3.
Definition: Knot_4_3.h:59
RealPoint xp(long double t) const