SmallMatrix3x3T.h
Go to the documentation of this file.
1 
7 #ifndef _MATRIX3D_MAL_DEFAULT_
8 #define _MATRIX3D_MAL_DEFAULT_
9 
10 namespace CD_Matrix
11 {
12 
13 template<typename U, bool b>
14 struct Vector3T;
15 template<typename U>
16 class QuaternionT;
17 
19 template<typename T>
20 struct Matrix3x3T
21 {
22 
24  T m[9];
25 
26  template<class Archive>
27  void serialize(Archive & ar, const unsigned int /*version*/)
28  {
29  ar & m;
30  }
31 
33  explicit Matrix3x3T<T>()
34  {
35  m[0] = 0.0;
36  m[1] = 0.0;
37  m[2] = 0.0;
38  m[3] = 0.0;
39  m[4] = 0.0;
40  m[5] = 0.0;
41  m[6] = 0.0;
42  m[7] = 0.0;
43  m[8] = 0.0;
44  }
45 
47  explicit Matrix3x3T<T>(const T * const x)
48  {
49  m[0] = x[0];
50  m[1] = x[1];
51  m[2] = x[2];
52  m[3] = x[3];
53  m[4] = x[4];
54  m[5] = x[5];
55  m[6] = x[6];
56  m[7] = x[7];
57  m[8] = x[8];
58  }
59 
61  explicit Matrix3x3T<T>(const T & x)
62  {
63  m[0] = x;
64  m[1] = x;
65  m[2] = x;
66  m[3] = x;
67  m[4] = x;
68  m[5] = x;
69  m[6] = x;
70  m[7] = x;
71  m[8] = x;
72  }
73 
75  explicit Matrix3x3T<T>(const T x0,
76  const T x1,
77  const T x2,
78  const T x3,
79  const T x4,
80  const T x5,
81  const T x6,
82  const T x7,
83  const T x8)
84  {
85  m[0] = x0;
86  m[1] = x1;
87  m[2] = x2;
88  m[3] = x3;
89  m[4] = x4;
90  m[5] = x5;
91  m[6] = x6;
92  m[7] = x7;
93  m[8] = x8;
94  }
95 
97  Matrix3x3T<T>(const struct Matrix3x3T<T> & v)
98  {
99  m[0] = v.m[0];
100  m[1] = v.m[1];
101  m[2] = v.m[2];
102  m[3] = v.m[3];
103  m[4] = v.m[4];
104  m[5] = v.m[5];
105  m[6] = v.m[6];
106  m[7] = v.m[7];
107  m[8] = v.m[8];
108  }
109 
112  {
113  m[0] = v.m[0];
114  m[1] = v.m[1];
115  m[2] = v.m[2];
116  m[3] = v.m[3];
117  m[4] = v.m[4];
118  m[5] = v.m[5];
119  m[6] = v.m[6];
120  m[7] = v.m[7];
121  m[8] = v.m[8];
122  return *this;
123  }
124 
126  template<typename T2>
127  Matrix3x3T<T>(const struct Matrix3x3T<T2> & v)
128  {
129  m[0] = v.m[0];
130  m[1] = v.m[1];
131  m[2] = v.m[2];
132  m[3] = v.m[3];
133  m[4] = v.m[4];
134  m[5] = v.m[5];
135  m[6] = v.m[6];
136  m[7] = v.m[7];
137  m[8] = v.m[8];
138  }
139 
141  template<bool b>
142  explicit Matrix3x3T<T>(const Vector3T<T, b> V1, const Vector3T<T, b> V2, const Vector3T<T, b> V3)
143  {
144  m[0] = V1[0];
145  m[1] = V2[0];
146  m[2] = V3[0];
147  m[3] = V1[1];
148  m[4] = V2[1];
149  m[5] = V3[1];
150  m[6] = V1[2];
151  m[7] = V2[2];
152  m[8] = V3[2];
153  }
154 
156  explicit Matrix3x3T<T>(const QuaternionT<T> & q)
157  {
158  T q0 = q[0], q1 = q[1], q2 = q[2], q3 = q[3];
159  T d = q0 * q0 + q1 * q1 + q2 * q2 + q3 * q3;
160  assert(d != T(0.0));
161  T s = T(2.0) / d;
162  T xs = q0 * s, ys = q1 * s, zs = q2 * s;
163  T wx = q3 * xs, wy = q3 * ys, wz = q3 * zs;
164  T xx = q0 * xs, xy = q0 * ys, xz = q0 * zs;
165  T yy = q1 * ys, yz = q1 * zs, zz = q2 * zs;
166 
167  m[0] = T(1.0) - (yy + zz), m[1] = xy - wz, m[2] = xz + wy, m[3] = xy + wz, m[4] = T(1.0) - (xx + zz),
168  m[5] = yz - wx, m[6] = xz - wy, m[7] = yz + wx, m[8] = T(1.0) - (xx + yy);
169  }
170 
172  explicit Matrix3x3T<T>(const T & q0, const T & q1, const T & q2, const T & q3)
173  {
174  T d = q0 * q0 + q1 * q1 + q2 * q2 + q3 * q3;
175  assert(d != T(0.0));
176  T s = T(2.0) / d;
177  T xs = q0 * s, ys = q1 * s, zs = q2 * s;
178  T wx = q3 * xs, wy = q3 * ys, wz = q3 * zs;
179  T xx = q0 * xs, xy = q0 * ys, xz = q0 * zs;
180  T yy = q1 * ys, yz = q1 * zs, zz = q2 * zs;
181 
182  m[0] = T(1.0) - (yy + zz);
183  m[1] = xy - wz;
184  m[2] = xz + wy;
185  m[3] = xy + wz;
186  m[4] = T(1.0) - (xx + zz);
187  m[5] = yz - wx;
188  m[6] = xz - wy;
189  m[7] = yz + wx;
190  m[8] = T(1.0) - (xx + yy);
191  }
192 
194  template<bool b>
195  explicit Matrix3x3T<T>(const T & angle, const Vector3T<T, b> & axis)
196  {
197  T sin_a = sin(angle / 2), cos_a = cos(angle / 2);
198 
199  T q0 = axis[0] * sin_a;
200  T q1 = axis[1] * sin_a;
201  T q2 = axis[2] * sin_a;
202  T q3 = cos_a;
203 
204  T d = q0 * q0 + q1 * q1 + q2 * q2 + q3 * q3;
205 
206  assert(d != T(0.0));
207  T s = T(2.0) / d;
208  T xs = q0 * s, ys = q1 * s, zs = q2 * s;
209  T wx = q3 * xs, wy = q3 * ys, wz = q3 * zs;
210  T xx = q0 * xs, xy = q0 * ys, xz = q0 * zs;
211  T yy = q1 * ys, yz = q1 * zs, zz = q2 * zs;
212 
213  m[0] = T(1.0) - (yy + zz);
214  m[1] = xy - wz;
215  m[2] = xz + wy;
216  m[3] = xy + wz;
217  m[4] = T(1.0) - (xx + zz);
218  m[5] = yz - wx;
219  m[6] = xz - wy;
220  m[7] = yz + wx;
221  m[8] = T(1.0) - (xx + yy);
222  }
223 
226  explicit Matrix3x3T<T>(const T & roll, const T & pitch, const T & yaw)
227  {
228 
229  T cy(cos(yaw));
230  T sy(sin(yaw));
231  T cp(cos(pitch));
232  T sp(sin(pitch));
233  T cr(cos(roll));
234  T sr(sin(roll));
235 
236  T sysp = sy * sp;
237  T cysp = cy * sp;
238  T sysr = sy * sr;
239  T sycr = sy * cr;
240 
241  this->m[0] = cy * cp;
242  this->m[1] = cysp * sr - sycr;
243  this->m[2] = cysp * cr + sysr;
244 
245  this->m[3] = sy * cp;
246  this->m[4] = sysp * sr + cy * cr;
247  this->m[5] = sysp * cr - cy * sr;
248 
249  this->m[6] = -sp;
250  this->m[7] = cp * sr;
251  this->m[8] = cp * cr;
252  }
253 
255  void Set(const T x0, const T x1, const T x2, const T x3, const T x4, const T x5, const T x6, const T x7, const T x8)
256  {
257  this->m[0] = x0;
258  this->m[1] = x1;
259  this->m[2] = x2;
260  this->m[3] = x3;
261  this->m[4] = x4;
262  this->m[5] = x5;
263  this->m[6] = x6;
264  this->m[7] = x7;
265  this->m[8] = x8;
266  }
267 
268  /*Set from a vector and an array*/
269  template<bool b>
270  void Set(const T & angle, const Vector3T<T, b> & axis)
271  {
272  T sin_a = sin(angle / 2), cos_a = cos(angle / 2);
273 
274  T q0 = axis[0] * sin_a;
275  T q1 = axis[1] * sin_a;
276  T q2 = axis[2] * sin_a;
277  T q3 = cos_a;
278 
279  T d = q0 * q0 + q1 * q1 + q2 * q2 + q3 * q3;
280 
281  assert(d != T(0.0));
282  T s = T(2.0) / d;
283  T xs = q0 * s, ys = q1 * s, zs = q2 * s;
284  T wx = q3 * xs, wy = q3 * ys, wz = q3 * zs;
285  T xx = q0 * xs, xy = q0 * ys, xz = q0 * zs;
286  T yy = q1 * ys, yz = q1 * zs, zz = q2 * zs;
287  this->m[0] = T(1.0) - (yy + zz);
288  this->m[1] = xy - wz;
289  this->m[2] = xz + wy;
290  this->m[3] = xy + wz;
291  this->m[4] = T(1.0) - (xx + zz);
292  this->m[5] = yz - wx;
293  this->m[6] = xz - wy;
294  this->m[7] = yz + wx;
295  this->m[8] = T(1.0) - (xx + yy);
296  }
297 
299  void Set(const T * const x)
300  {
301  this->m[0] = x[0];
302  this->m[1] = x[1];
303  this->m[2] = x[2];
304  this->m[3] = x[3];
305  this->m[4] = x[4];
306  this->m[5] = x[5];
307  this->m[6] = x[6];
308  this->m[7] = x[7];
309  this->m[8] = x[8];
310  }
311 
313  void Set(const QuaternionT<T> & q)
314  {
315  T q0 = q[0], q1 = q[1], q2 = q[2], q3 = q[3];
316  T d = q0 * q0 + q1 * q1 + q2 * q2 + q3 * q3;
317  assert(d != T(0.0));
318  T s = T(2.0) / d;
319  T xs = q0 * s, ys = q1 * s, zs = q2 * s;
320  T wx = q3 * xs, wy = q3 * ys, wz = q3 * zs;
321  T xx = q0 * xs, xy = q0 * ys, xz = q0 * zs;
322  T yy = q1 * ys, yz = q1 * zs, zz = q2 * zs;
323  this->m[0] = T(1.0) - (yy + zz), this->m[1] = xy - wz, this->m[2] = xz + wy, this->m[3] = xy + wz,
324  this->m[4] = T(1.0) - (xx + zz), this->m[5] = yz - wx, this->m[6] = xz - wy, this->m[7] = yz + wx,
325  this->m[8] = T(1.0) - (xx + yy);
326  }
327 
329  void Set(const T & q0, const T & q1, const T & q2, const T & q3)
330  {
331  T d = q0 * q0 + q1 * q1 + q2 * q2 + q3 * q3;
332  assert(d != T(0.0));
333  T s = T(2.0) / d;
334  T xs = q0 * s, ys = q1 * s, zs = q2 * s;
335  T wx = q3 * xs, wy = q3 * ys, wz = q3 * zs;
336  T xx = q0 * xs, xy = q0 * ys, xz = q0 * zs;
337  T yy = q1 * ys, yz = q1 * zs, zz = q2 * zs;
338  this->m[0] = T(1.0) - (yy + zz);
339  this->m[1] = xy - wz;
340  this->m[2] = xz + wy;
341  this->m[3] = xy + wz;
342  this->m[4] = T(1.0) - (xx + zz);
343  this->m[5] = yz - wx;
344  this->m[6] = xz - wy;
345  this->m[7] = yz + wx;
346  this->m[8] = T(1.0) - (xx + yy);
347  }
348 
350  void Set(const T & yaw, const T & pitch, const T & roll)
351  {
352  T cy(cos(double(yaw)));
353  T sy(sin(double(yaw)));
354  T cp(cos(double(pitch)));
355  T sp(sin(double(pitch)));
356  T cr(cos(double(roll)));
357  T sr(sin(double(roll)));
358  T cc = cy * cr;
359  T cs = cy * sr;
360  T sc = sy * cr;
361  T ss = sy * sr;
362 
363  this->m[0] = cc + sp * ss;
364  this->m[1] = cs - sp * sc;
365  this->m[2] = -sy * cp;
366  this->m[3] = -cp * sr;
367  this->m[4] = cp * cr;
368  this->m[5] = -sp;
369  this->m[6] = sc - sp * cs;
370  this->m[7] = ss + sp * cc;
371  this->m[8] = cy * cp;
372  }
373 
375  inline T & operator[](unsigned int i)
376  {
377  return m[i];
378  }
379 
381  inline T operator[](unsigned int i) const
382  {
383  return m[i];
384  }
385 
387  inline T & operator()(unsigned int i, unsigned int j)
388  {
389  return m[3 * i + j];
390  }
391 
393  inline const T & operator()(unsigned int i, unsigned int j) const
394  {
395  return m[3 * i + j];
396  }
397 
399  inline void setZero(void)
400  {
401  m[0] = 0.0;
402  m[1] = 0.0;
403  m[2] = 0.0;
404  m[3] = 0.0;
405  m[4] = 0.0;
406  m[5] = 0.0;
407  m[6] = 0.0;
408  m[7] = 0.0;
409  m[8] = 0.0;
410  }
411 
413  void setIdentity(void)
414  {
415  m[0] = 1.0;
416  m[1] = 0.0;
417  m[2] = 0.0;
418  m[3] = 0.0;
419  m[4] = 1.0;
420  m[5] = 0.0;
421  m[6] = 0.0;
422  m[7] = 0.0;
423  m[8] = 1.0;
424  }
425 
428  {
429  struct Matrix3x3T<T> A;
430  A.m[0] = m[0] + B.m[0];
431  A.m[1] = m[1] + B.m[1];
432  A.m[2] = m[2] + B.m[2];
433  A.m[3] = m[3] + B.m[3];
434  A.m[4] = m[4] + B.m[4];
435  A.m[5] = m[5] + B.m[5];
436  A.m[6] = m[6] + B.m[6];
437  A.m[7] = m[7] + B.m[7];
438  A.m[8] = m[8] + B.m[8];
439  return A;
440  }
441 
443  struct Matrix3x3T<T> operator-(const struct Matrix3x3T<T> & B)
444  {
445  struct Matrix3x3T<T> A;
446  A.m[0] = m[0] - B.m[0];
447  A.m[1] = m[1] - B.m[1];
448  A.m[2] = m[2] - B.m[2];
449  A.m[3] = m[3] - B.m[3];
450  A.m[4] = m[4] - B.m[4];
451  A.m[5] = m[5] - B.m[5];
452  A.m[6] = m[6] - B.m[6];
453  A.m[7] = m[7] - B.m[7];
454  A.m[8] = m[8] - B.m[8];
455  return A;
456  }
457 
458  void CeqthismulB(const Matrix3x3T<T> & B, Matrix3x3T<T> & C) const
459  {
460  C.m[0] = m[0] * B.m[0] + m[1] * B.m[3] + m[2] * B.m[6];
461  C.m[1] = m[0] * B.m[1] + m[1] * B.m[4] + m[2] * B.m[7];
462  C.m[2] = m[0] * B.m[2] + m[1] * B.m[5] + m[2] * B.m[8];
463  C.m[3] = m[3] * B.m[0] + m[4] * B.m[3] + m[5] * B.m[6];
464  C.m[4] = m[3] * B.m[1] + m[4] * B.m[4] + m[5] * B.m[7];
465  C.m[5] = m[3] * B.m[2] + m[4] * B.m[5] + m[5] * B.m[8];
466  C.m[6] = m[6] * B.m[0] + m[7] * B.m[3] + m[8] * B.m[6];
467  C.m[7] = m[6] * B.m[1] + m[7] * B.m[4] + m[8] * B.m[7];
468  C.m[8] = m[6] * B.m[2] + m[7] * B.m[5] + m[8] * B.m[8];
469  }
470 
472  Matrix3x3T<T> operator*(const double & r)
473  {
474  struct Matrix3x3T<T> result;
475  result.m[0] = m[0] * r;
476  result.m[1] = m[1] * r;
477  result.m[2] = m[2] * r;
478  result.m[3] = m[3] * r;
479  result.m[4] = m[4] * r;
480  result.m[5] = m[5] * r;
481  result.m[6] = m[6] * r;
482  result.m[7] = m[7] * r;
483  result.m[8] = m[8] * r;
484  return result;
485  }
486 
487  template<bool b>
489  {
490  Vector3T<T, b> vr(m[0] * v[0] + m[1] * v[1] + m[2] * v[2], m[3] * v[0] + m[4] * v[1] + m[5] * v[2],
491  m[6] * v[0] + m[7] * v[1] + m[8] * v[2]);
492  return vr;
493  }
494 
496  template<bool b>
498  {
499 
500  C[0] = m[0] * B[0] + m[1] * B[1] + m[2] * B[2];
501  C[1] = m[3] * B[0] + m[4] * B[1] + m[5] * B[2];
502  C[2] = m[6] * B[0] + m[7] * B[1] + m[8] * B[2];
503  }
504 
507  {
508  T t;
509  t = m[1];
510  m[1] = m[3];
511  m[3] = t;
512 
513  t = m[2];
514  m[2] = m[6];
515  m[6] = t;
516 
517  t = m[5];
518  m[5] = m[7];
519  m[7] = t;
520 
521  return *this;
522  }
523 
526  {
527  return Matrix3x3T<T>(this->m[0], this->m[3], this->m[6], this->m[1], this->m[4], this->m[7], this->m[2], this->m[5],
528  this->m[8]);
529  }
530 
532  void Transpose(Matrix3x3T<T> & A) const
533  {
534  A.m[0] = m[0];
535  A.m[1] = m[3];
536  A.m[2] = m[6];
537  A.m[3] = m[1];
538  A.m[4] = m[4];
539  A.m[5] = m[7];
540  A.m[6] = m[2];
541  A.m[7] = m[5];
542  A.m[8] = m[8];
543  }
544 
546  void Inversion(struct Matrix3x3T<T> & A) const
547  {
548  T det = 1 / determinant();
549  A.m[0] = (m[4] * m[8] - m[5] * m[7]) * det;
550  A.m[1] = (m[2] * m[7] - m[1] * m[8]) * det;
551  A.m[2] = (m[1] * m[5] - m[2] * m[4]) * det;
552  A.m[3] = (m[5] * m[6] - m[3] * m[8]) * det;
553  A.m[4] = (m[0] * m[8] - m[2] * m[6]) * det;
554  A.m[5] = (m[2] * m[3] - m[0] * m[5]) * det;
555  A.m[6] = (m[3] * m[7] - m[4] * m[6]) * det;
556  A.m[7] = (m[1] * m[6] - m[0] * m[7]) * det;
557  A.m[8] = (m[0] * m[4] - m[1] * m[3]) * det;
558  }
559 
561  T determinant() const
562  {
563  T det = m[0] * m[4] * m[8];
564  det += m[1] * m[5] * m[6];
565  det += m[2] * m[3] * m[7];
566  det -= m[2] * m[4] * m[6];
567  det -= m[0] * m[5] * m[7];
568  det -= m[1] * m[3] * m[8];
569  return det;
570  }
571 
573  void Fill(T value)
574  {
575  m[0] = value;
576  m[1] = value;
577  m[2] = value;
578  m[3] = value;
579  m[4] = value;
580  m[5] = value;
581  m[6] = value;
582  m[7] = value;
583  m[8] = value;
584  }
585 
587  bool IsIdentity()
588  {
589  return ((m[0] == 1) && (m[4] == 1) && (m[8] == 1) && (m[1] == 0) && (m[2] == 0) && (m[3] == 0) && (m[5] == 0)
590  && (m[6] == 0) && (m[7] == 0));
591  }
592 
594  void operator+=(const Matrix3x3T<T> & B)
595  {
596  m[0] += B.m[0];
597  m[1] += B.m[1];
598  m[2] += B.m[2];
599  m[3] += B.m[3];
600  m[4] += B.m[4];
601  m[5] += B.m[5];
602  m[6] += B.m[6];
603  m[7] += B.m[7];
604  m[8] += B.m[8];
605  }
606 
608  void operator-=(const Matrix3x3T<T> & B)
609  {
610  m[0] -= B.m[0];
611  m[1] -= B.m[1];
612  m[2] -= B.m[2];
613  m[3] -= B.m[3];
614  m[4] -= B.m[4];
615  m[5] -= B.m[5];
616  m[6] -= B.m[6];
617  m[7] -= B.m[7];
618  m[8] -= B.m[8];
619  }
620 
622 
624  {
625  return Matrix3x3T<T>(m[0] * B.m[0] + m[1] * B.m[3] + m[2] * B.m[6], m[0] * B.m[1] + m[1] * B.m[4] + m[2] * B.m[7],
626  m[0] * B.m[2] + m[1] * B.m[5] + m[2] * B.m[8], m[3] * B.m[0] + m[4] * B.m[3] + m[5] * B.m[6],
627  m[3] * B.m[1] + m[4] * B.m[4] + m[5] * B.m[7], m[3] * B.m[2] + m[4] * B.m[5] + m[5] * B.m[8],
628  m[6] * B.m[0] + m[7] * B.m[3] + m[8] * B.m[6], m[6] * B.m[1] + m[7] * B.m[4] + m[8] * B.m[7],
629  m[6] * B.m[2] + m[7] * B.m[5] + m[8] * B.m[8]);
630  }
631 
632  void operator*=(const Matrix3x3T<T> & B)
633  {
634  Matrix3x3T<T> temp(*this);
635 
636  m[0] = temp.m[0] * B.m[0] + temp.m[1] * B.m[3] + temp.m[2] * B.m[6];
637  m[1] = temp.m[0] * B.m[1] + temp.m[1] * B.m[4] + temp.m[2] * B.m[7];
638  m[2] = temp.m[0] * B.m[2] + temp.m[1] * B.m[5] + temp.m[2] * B.m[8];
639  m[3] = temp.m[3] * B.m[0] + temp.m[4] * B.m[3] + temp.m[5] * B.m[6];
640  m[4] = temp.m[3] * B.m[1] + temp.m[4] * B.m[4] + temp.m[5] * B.m[7];
641  m[5] = temp.m[3] * B.m[2] + temp.m[4] * B.m[5] + temp.m[5] * B.m[8];
642  m[6] = temp.m[6] * B.m[0] + temp.m[7] * B.m[3] + temp.m[8] * B.m[6];
643  m[7] = temp.m[6] * B.m[1] + temp.m[7] * B.m[4] + temp.m[8] * B.m[7];
644  m[8] = temp.m[6] * B.m[2] + temp.m[7] * B.m[5] + temp.m[8] * B.m[8];
645  }
646 
648  void operator*=(const T & t)
649  {
650  m[0] *= t;
651  m[1] *= t;
652  m[2] *= t;
653  m[3] *= t;
654  m[4] *= t;
655  m[5] *= t;
656  m[6] *= t;
657  m[7] *= t;
658  m[8] *= t;
659  }
660 
661  inline friend std::ostream & operator<<(std::ostream & os, Matrix3x3T<T> const & A)
662  {
663  for(int i = 0; i < 3; i++)
664  {
665  for(int j = 0; j < 3; j++) os << A.m[i * 3 + j] << " ";
666  os << std::endl;
667  }
668  return os;
669  }
670 };
671 } // namespace CD_Matrix
672 
673 #endif
CD_Matrix::Matrix3x3T::operator*
Vector3T< T, b > operator*(const Vector3T< T, b > &v) const
Definition: SmallMatrix3x3T.h:488
CD_Matrix::Matrix3x3T::operator[]
T operator[](unsigned int i) const
Definition: SmallMatrix3x3T.h:381
CD_Matrix::Matrix3x3T::Set
void Set(const T *const x)
Definition: SmallMatrix3x3T.h:299
CD_Matrix::Matrix3x3T::operator*=
void operator*=(const Matrix3x3T< T > &B)
Definition: SmallMatrix3x3T.h:632
CD_Matrix::Matrix3x3T::operator*
Matrix3x3T< T > operator*(const Matrix3x3T< T > &B) const
Local matrix multiplication.
Definition: SmallMatrix3x3T.h:623
CD_Matrix::Matrix3x3T::CeqthismulB
void CeqthismulB(Vector3T< T, b > &B, Vector3T< T, b > &C) const
Definition: SmallMatrix3x3T.h:497
CD_Matrix::Matrix3x3T::Set
void Set(const T x0, const T x1, const T x2, const T x3, const T x4, const T x5, const T x6, const T x7, const T x8)
set from 9 scalar
Definition: SmallMatrix3x3T.h:255
CD_Matrix::Matrix3x3T::operator-=
void operator-=(const Matrix3x3T< T > &B)
Definition: SmallMatrix3x3T.h:608
CD_Matrix::Matrix3x3T::CeqthismulB
void CeqthismulB(const Matrix3x3T< T > &B, Matrix3x3T< T > &C) const
Definition: SmallMatrix3x3T.h:458
CD_Matrix::Matrix3x3T::setIdentity
void setIdentity(void)
Definition: SmallMatrix3x3T.h:413
CD_Matrix::Matrix3x3T::operator<<
friend std::ostream & operator<<(std::ostream &os, Matrix3x3T< T > const &A)
Definition: SmallMatrix3x3T.h:661
CD_Matrix::Matrix3x3T::Set
void Set(const T &q0, const T &q1, const T &q2, const T &q3)
Definition: SmallMatrix3x3T.h:329
CD_Matrix::Matrix3x3T::m
T m[9]
Definition: SmallMatrix3x3T.h:24
CD_Matrix::Matrix3x3T::IsIdentity
bool IsIdentity()
Definition: SmallMatrix3x3T.h:587
CD_Matrix::Matrix3x3T::Transpose
Matrix3x3T< T > Transpose() const
Definition: SmallMatrix3x3T.h:525
CD_Matrix::Matrix3x3T::operator+=
void operator+=(const Matrix3x3T< T > &B)
Definition: SmallMatrix3x3T.h:594
CD_Matrix::Matrix3x3T::Transpose
void Transpose(Matrix3x3T< T > &A) const
Definition: SmallMatrix3x3T.h:532
CD_Matrix::Matrix3x3T::operator()
T & operator()(unsigned int i, unsigned int j)
Definition: SmallMatrix3x3T.h:387
CD_Matrix::Matrix3x3T::TransposeIt
Matrix3x3T< T > & TransposeIt()
Definition: SmallMatrix3x3T.h:506
CD_Matrix::Matrix3x3T::Fill
void Fill(T value)
Definition: SmallMatrix3x3T.h:573
CD_Matrix::Matrix3x3T::Set
void Set(const QuaternionT< T > &q)
Definition: SmallMatrix3x3T.h:313
CD_Matrix::Matrix3x3T::serialize
void serialize(Archive &ar, const unsigned int)
Definition: SmallMatrix3x3T.h:27
CD_Matrix::Matrix3x3T::operator[]
T & operator[](unsigned int i)
Definition: SmallMatrix3x3T.h:375
CD_Matrix::Matrix3x3T::operator+
Matrix3x3T< T > operator+(const struct Matrix3x3T< T > &B)
Definition: SmallMatrix3x3T.h:427
CD_Matrix::QuaternionT
Definition: QuaternionT.h:10
CD_Matrix
Definition: QuaternionT.h:6
CD_Matrix::Matrix3x3T::determinant
T determinant() const
Definition: SmallMatrix3x3T.h:561
CD_Matrix::Vector3T
Definition: SmallMatrix3x3T.h:14
CD_Matrix::Matrix3x3T::Set
void Set(const T &angle, const Vector3T< T, b > &axis)
Definition: SmallMatrix3x3T.h:270
CD_Matrix::Matrix3x3T::operator*
Matrix3x3T< T > operator*(const double &r)
Definition: SmallMatrix3x3T.h:472
CD_Matrix::Matrix3x3T::operator()
const T & operator()(unsigned int i, unsigned int j) const
Definition: SmallMatrix3x3T.h:393
CD_Matrix::Matrix3x3T::setZero
void setZero(void)
Definition: SmallMatrix3x3T.h:399
CD_Matrix::Matrix3x3T
Definition: SmallMatrix3x3T.h:20
CD_Matrix::Matrix3x3T::Inversion
void Inversion(struct Matrix3x3T< T > &A) const
Definition: SmallMatrix3x3T.h:546
CD_Matrix::Matrix3x3T::operator=
Matrix3x3T< T > & operator=(const Matrix3x3T< T > &v)
Definition: SmallMatrix3x3T.h:111
CD_Matrix::Matrix3x3T::operator*=
void operator*=(const T &t)
Definition: SmallMatrix3x3T.h:648
CD_Matrix::Matrix3x3T::Set
void Set(const T &yaw, const T &pitch, const T &roll)
Definition: SmallMatrix3x3T.h:350