Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
NurbsTemplateInit.hh
1 #ifndef NURBSTEMPLATEINIT_HH
2 #define NURBSTEMPLATEINIT_HH
3 
4 #include <Base/Math/Vector2.hh>
5 #include <Base/Math/Vector3.hh>
6 #include <Base/Math/Vector4.hh>
7 #include <Base/Geometry/HomgPoint2D.hh>
8 #include <Base/Geometry/HomgPoint3D.hh>
9 
10 /** Helper class for the Nurbs class set. It Provides init function
11  * for possible template types while keeping the code efficient.
12  * Add your init function here if you want to use Nurbs with a
13  * ControlPoint type not listed here.
14  * Please use the most efficient way to init the template type.
15  * @author jordt
16  */
18  public:
19  static inline void Init(double &value){
20  value = 0.0;
21  }
22  static inline void Init(BIAS::Vector<double> &value){
23  value.Fill(0.0);
24  }
25  static inline void Init(BIAS::Vector2<double> &value){
26  value[0] = 0.0;
27  value[1] = 0.0;
28  }
29  static inline void Init(BIAS::Vector3<double> &value){
30  value[0] = 0.0;
31  value[1] = 0.0;
32  value[2] = 0.0;
33  }
34  static inline void Init(BIAS::Vector4<double> &value){
35  value[0] = 0.0;
36  value[1] = 0.0;
37  value[2] = 0.0;
38  value[3] = 0.0;
39  }
40  static inline void Init(BIAS::HomgPoint2D &value){
41  value[0] = 0.0;
42  value[1] = 0.0;
43  value[2] = 1.0;
44  }
45  static inline void Init(BIAS::HomgPoint3D &value){
46  value[0] = 0.0;
47  value[1] = 0.0;
48  value[2] = 0.0;
49  value[3] = 1.0;
50  }
51 };
52 
53 
54 #endif // NURBSTEMPLATEINIT_HH
static void Init(BIAS::HomgPoint2D &value)
static void Init(BIAS::Vector< double > &value)
class HomgPoint2D describes a point with 2 degrees of freedom in projective coordinates.
Definition: HomgPoint2D.hh:67
static void Init(double &value)
static void Init(BIAS::HomgPoint3D &value)
class Vector4 contains a Vector of dim.
Definition: Vector4.hh:65
Helper class for the Nurbs class set.
class HomgPoint3D describes a point with 3 degrees of freedom in projective coordinates.
Definition: HomgPoint3D.hh:61
static void Init(BIAS::Vector2< double > &value)
static void Init(BIAS::Vector4< double > &value)
static void Init(BIAS::Vector3< double > &value)
void Fill(const T &scalar)
fills complete Vector with scalar value
Definition: Vector.cpp:92