25 #ifndef _Matrix3x2_hh_
26 #define _Matrix3x2_hh_
27 #include "bias_config.h"
29 #include <Base/Debug/Error.hh>
32 #include "Matrix2x3.hh"
33 #include "Matrix2x2.hh"
45 template<
class T=
double>
55 this->v_[0] = this->v_[3] = T(1);
return;
58 BIASERR(
"undefined MatrixInitType");
73 const T a0,
const T a1,
74 const T a2,
const T a3,
75 const T a4,
const T a5);
95 Vector2<T> ret; MultLeft(argvec, ret);
return ret;
112 inline void SetIdentity();
115 inline void SetZero();
124 { BIASERR(
"CANNOT RESIZE FIXED SIZE MATRIX!!!");
131 const T a2,
const T a3,
132 const T a4,
const T a5)
133 { this->v_[0] = a0; this->v_[1] = a1;
134 this->v_[2] = a2; this->v_[3] = a3;
135 this->v_[4] = a4; this->v_[5] = a5; }
140 register T *vP = this->v_;
141 register const T *matP = mat.
GetData();
143 vP[0] = matP[0]; vP[1] = matP[1];
144 vP[2] = matP[2]; vP[3] = matP[3];
145 vP[4] = matP[4]; vP[5] = matP[5];
155 register const T *dataP = this->GetData();
156 register T *resP = res.
GetData();
157 resP[0] = dataP[0]; resP[1] = dataP[2]; resP[2] = dataP[4];
158 resP[3] = dataP[1]; resP[4] = dataP[3]; resP[5] = dataP[5];
167 register T *destP = destmat.
GetData();
168 const register T *argP = argmat.
GetData();
169 const register T *matP = this->GetData();
171 destP[0] = matP[0] * argP[0] + matP[1] * argP[2];
172 destP[1] = matP[0] * argP[1] + matP[1] * argP[3];
173 destP[2] = matP[2] * argP[0] + matP[3] * argP[2];
174 destP[3] = matP[2] * argP[1] + matP[3] * argP[3];
175 destP[4] = matP[4] * argP[0] + matP[5] * argP[2];
176 destP[5] = matP[4] * argP[1] + matP[5] * argP[3];
184 const register T *matP = this->GetData();
185 destvec[0] = matP[0] * argvec[0] + matP[1] * argvec[1];
186 destvec[1] = matP[2] * argvec[0] + matP[3] * argvec[1];
187 destvec[2] = matP[4] * argvec[0] + matP[5] * argvec[1];
194 const register T *matP = this->GetData();
195 destvec[0] = argvec[0] * matP[0] + argvec[1] * matP[2] + argvec[2] * matP[4];
196 destvec[1] = argvec[0] * matP[1] + argvec[1] * matP[3] + argvec[2] * matP[5];
202 register T* d = this->GetData();
204 d[1] = d[2] = d[4] = d[5] = 0;
209 register T* d = this->GetData();
210 d[0]=d[1]=d[2]=d[3]=d[4]=d[5] =0;
215 #include "Operators.hh"
217 #endif // _Matrix3x2_hh_
MatrixInitType
can be passed to matrix constructors to init the matrix with the most often used values ...
is a 'fixed size' quadratic matrix of dim.
is a 'fixed size'
Matrix2x3< T > Transpose() const
returns transposed matrix
void MultLeft(const Vector3< T > &argvec, Vector2< T > &destvec) const
matrix - vector multiplicate this matrix with Vector2, storing the result in destvec calculates: dest...
class Vector2 contains a Vector of dim.
Vector2< T > MultLeft(const Vector3< T > &argvec) const
transposed argvec multipied from left, wrapper function
void Mult(const Vector2< T > &argvec, Vector3< T > &destvec) const
matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: dest...
void clear()
stl conform interface
void SetIdentity()
set the elements of this matrix to the identity matrix
T * GetData()
get the pointer to the data array of the matrix (for faster direct memeory access) ...
is a 'fixed size' 2x3 matrix templated over the elemnt-type.
class Vector3 contains a Vector of fixed dim.
void SetZero()
set the elements of this matrix to zero
matrix class with arbitrary size, indexing is row major.
Matrix3x2 & newsize(int rows, int cols)
Fixed size matrix, resize not allowed.
Matrix3x2< T > & operator=(const Matrix3x2< T > &mat)
assignment operator