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