DGtal 1.3.0
Loading...
Searching...
No Matches
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)
35#define Knot_4_3_RECURSES
36
37#if !defined Knot_4_3_h
39#define Knot_4_3_h
40
42// Inclusions
43#include <iostream>
44#include <cmath>
45#include "DGtal/base/Common.h"
47
48namespace DGtal
49{
50
52// class Knot_4_3
58template <typename TSpace>
60{
61 // ----------------------- Standard services ------------------------------
62public:
63 typedef TSpace Space;
64 typedef typename TSpace::RealPoint RealPoint;
65 typedef typename TSpace::Point Point;
66
71
78 Knot_4_3 ( long double scale_1, long double scale_2, long double scale_3 );
79
80
81 // ----------------------- Interface --------------------------------------
82public:
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 ------------------------------
115private:
116 // ------------------------- Private Datas --------------------------------
117private:
118 long double scale[3];
119 // ------------------------- Hidden services ------------------------------
120protected:
121
127
128private:
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 ------------------------------------
147private:
148 static constexpr double PERIOD = M_PI * 2.0;
149
150}; // end of class Knot_4_3
151
152
159template <typename T>
160std::ostream&
161operator<< ( 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)
Aim: Implement a parametrized knot 4, 3.
Definition: Knot_4_3.h:60
static double getPeriod()
RealPoint x(long double t) const
Knot_4_3(long double scale_1, long double scale_2, long double scale_3)
Knot_4_3(const Knot_4_3 &other)
TSpace::RealPoint RealPoint
Definition: Knot_4_3.h:64
TSpace::Point Point
Definition: Knot_4_3.h:65
void selfDisplay(std::ostream &out) const
RealPoint xp(long double t) const
Knot_4_3 & operator=(const Knot_4_3 &other)
bool isValid() const
TSpace Space
Definition: Knot_4_3.h:63
static constexpr double PERIOD
Definition: Knot_4_3.h:148
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)