Sensor Scol plugin
Multi platform sensors for handled devices
Matrix3x3d.h
1//
2// Matrix3x3d.h
3//
4
5#ifndef __Matrix3x3d__
6#define __Matrix3x3d__
7
8#include "Vector3d.h"
9
11{
12 public:
13 Matrix3x3d();
14 Matrix3x3d(double m00, double m01, double m02,
15 double m10, double m11, double m12,
16 double m20, double m21, double m22);
17 Matrix3x3d(const Matrix3x3d &o);
18
19 void set(double m00, double m01, double m02,
20 double m10, double m11, double m12,
21 double m20, double m21, double m22);
22 void set(Matrix3x3d o);
23 void setZero();
24 void setIdentity();
25 void setDiagonal(double d);
26
27 double get(int row, int col);
28 void set(int row, int col, double value);
29
30 void getColumn(int col, Vector3d &v);
31 void setColumn(int col, Vector3d v);
32
33 void scale(double s);
34
35 void plusEquals(Matrix3x3d b);
36 void minusEquals(Matrix3x3d b);
37
38 void transpose();
39 void transpose(Matrix3x3d &result);
40
41 static void add(Matrix3x3d a, Matrix3x3d b, Matrix3x3d &result);
42 static void mult(Matrix3x3d a, Matrix3x3d b, Matrix3x3d &result);
43 static void mult(Matrix3x3d a, Vector3d v, Vector3d &result);
44
45 double determinant();
46
47 bool invert(Matrix3x3d &result);
48
49
50 private:
51 double _m[9];
52};
53
54#endif