MeVisLab Toolbox Reference
mlVector8.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2007, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#ifndef ML_VECTOR8_H
14#define ML_VECTOR8_H
15
17
18// Include system independent file and project settings.
20#include "mlLinearAlgebraDefs.h"
22
23// All declarations of this header will be in the ML_LA_NAMESPACE namespace.
25
26//--------------------------------------------------------------------
28//--------------------------------------------------------------------
30template <class DT>
31class Tvec8 : public FloatingPointVector<DT,8>
32{
33public:
34
37
39 typedef DT ComponentType;
40
41 //--------------------------------------------------------------------
44 //--------------------------------------------------------------------
47 inline explicit Tvec8(const DT value=0) : Superclass(value)
48 {
49 }
50
54 inline Tvec8(const Superclass &v) : Superclass(v)
55 {
56 }
57
60 inline Tvec8(const DT x, const DT y, const DT z, const DT c,
61 const DT t, const DT u, const DT v, const DT w)
62 {
63 assign(x,y,z,c,t,u,v,w);
64 }
66
67 //--------------------------------------------------------------------
70 //--------------------------------------------------------------------
72 inline void assign(const DT x, const DT y, const DT z, const DT c,
73 const DT t, const DT u, const DT v, const DT w)
74 {
75 Superclass::_buffer[0] = x;
76 Superclass::_buffer[1] = y;
77 Superclass::_buffer[2] = z;
78 Superclass::_buffer[3] = c;
79 Superclass::_buffer[4] = t;
80 Superclass::_buffer[5] = u;
81 Superclass::_buffer[6] = v;
82 Superclass::_buffer[7] = w;
83 }
85};
86
87
88//-----------------------------------------------------------------------------------
91//-----------------------------------------------------------------------------------
101
102
104
105#endif //of __mlVector8_H
106
107
108
Template class for vector arithmetic with floating point data types.
An eight dimensional vector class for floating point types.
Definition mlVector8.h:32
FloatingPointVector< DT, 8 > Superclass
A typedef as a shorthand for the base class.
Definition mlVector8.h:36
Tvec8(const Superclass &v)
Copy constructor from FloatingPointVector.
Definition mlVector8.h:54
DT ComponentType
A typedef to "export" the type of components.
Definition mlVector8.h:39
Tvec8(const DT value=0)
Default and value constructor.
Definition mlVector8.h:47
void assign(const DT x, const DT y, const DT z, const DT c, const DT t, const DT u, const DT v, const DT w)
Sets all components to the passed values.
Definition mlVector8.h:72
Tvec8(const DT x, const DT y, const DT z, const DT c, const DT t, const DT u, const DT v, const DT w)
Builds the vector from the scalars x, y, z, c, t, u, v and w to the components 0 to 7,...
Definition mlVector8.h:60
Target mlrange_cast(Source arg)
Generic version of checked ML casts.