DGtal  1.5.beta
EllipticHelix.h
1 
17 #pragma once
18 
31 #if defined(EllipticHelix_RECURSES)
32 #error Recursive header files inclusion detected in EllipticHelix.h
33 #else // defined(EllipticHelix_RECURSES)
35 #define EllipticHelix_RECURSES
36 
37 #if !defined EllipticHelix_h
39 #define EllipticHelix_h
40 
42 // Inclusions
43 #include <iostream>
44 #include <cmath>
45 #include "DGtal/base/Common.h"
47 
48 namespace DGtal
49 {
50 
52 // class EllipticHelix
58 template <typename TSpace>
60 {
61  // ----------------------- Standard services ------------------------------
62 public:
63  typedef TSpace Space;
64  typedef typename TSpace::RealPoint RealPoint;
65  typedef typename TSpace::Point Point;
66 
77  EllipticHelix ( long double rr, long double rl, long double bb );
78 
79 
80  // ----------------------- Interface --------------------------------------
81 public:
82 
88  RealPoint x ( long double t ) const;
89 
95  RealPoint xp ( long double t ) const;
96 
102  long double f ( const RealPoint & p ) const;
103 
109  long double g ( const RealPoint & p ) const;
110 
116  long double h ( const RealPoint & p ) const;
117 
118  static double getPeriod();
119 
124  void selfDisplay ( std::ostream & out ) const;
125 
130  bool isValid() const;
131 
132 
133  // ------------------------- Protected Datas ------------------------------
134 private:
135  // ------------------------- Private Datas --------------------------------
136 private:
137  long double r1, r2, b;
138  // ------------------------- Hidden services ------------------------------
139 protected:
140 
146 
147 private:
148 
154  EllipticHelix ( const EllipticHelix & other );
155 
163 
164 
165  // ------------------------- Internals ------------------------------------
166 private:
167 
168  static constexpr double PERIOD = M_PI * 2.0;
169 
170 }; // end of class EllipticHelix
171 
172 
179 template <typename T>
180 std::ostream&
181 operator<< ( std::ostream & out, const EllipticHelix<T> & object );
182 
183 
184 } // namespace DGtal
185 
186 
188 // Includes inline functions.
189 #if !defined(BUILD_INLINE)
190 #include "DGtal/geometry/curves/parametric/EllipticHelix.ih"
191 #endif
192 
193 
194 // //
196 
197 #endif // !defined EllipticHelix_h
198 
199 #undef EllipticHelix_RECURSES
200 #endif // else defined(EllipticHelix_RECURSES)
Aim: Implement a parametric curve – elliptic helix.
Definition: EllipticHelix.h:60
TSpace::Point Point
Definition: EllipticHelix.h:65
long double g(const RealPoint &p) const
inverse function of y
RealPoint xp(long double t) const
bool isValid() const
RealPoint x(long double t) const
EllipticHelix & operator=(const EllipticHelix &other)
long double h(const RealPoint &p) const
inverse function of z
EllipticHelix(long double rr, long double rl, long double bb)
static constexpr double PERIOD
void selfDisplay(std::ostream &out) const
TSpace::RealPoint RealPoint
Definition: EllipticHelix.h:64
long double f(const RealPoint &p) const
inverse function of x
EllipticHelix(const EllipticHelix &other)
static double getPeriod()
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