123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206 |
-
-
- #ifndef _MATRIX_H_
- #define _MATRIX_H_
-
- #include <MatMath.h>
- #include <Quaternion.h>
- #include <Vector3d.h>
-
-
-
- class Matrix {
- public:
-
-
-
- Matrix();
-
-
-
- Matrix(matrix_t mat);
-
-
-
- Matrix(Quaternion &q);
-
-
-
- ~Matrix();
-
-
-
- void getMatrix(matrix_t mat);
-
-
-
- void getTransposeMatrix(matrix_t mat);
-
-
-
- bool getInvert(matrix_t mat);
-
-
-
- Matrix multiply(const Matrix &a, const Matrix &b);
-
-
-
- void multiply4v(vec4_t v, vec4_t result);
-
-
-
- void multiply3v(vec3_t v, vec3_t result);
-
-
-
- void print();
-
-
-
- bool isIdentity();
-
-
-
- Matrix operator *(const Matrix &a);
-
-
-
- Vector3d operator *(Vector3d v);
-
-
-
- void setIdentity();
-
-
-
- void setMatrix(matrix_t mat);
-
-
-
- void rotate(vec_t x, vec_t y, vec_t z);
-
-
-
- void rotate(const vec_t *xyz);
-
-
-
- void scale(vec_t x, vec_t y, vec_t z);
-
-
-
- void scale(const vec_t *xyz);
-
-
-
- void translate(vec_t x, vec_t y, vec_t z);
-
-
-
- void translate(const vec_t *xyz);
-
-
-
- void transpose();
-
- matrix_t mMatrix;
-
- private:
-
-
-
- void copy(matrix_t source, matrix_t dest);
-
-
-
- void multiply(const matrix_t a, const matrix_t b, matrix_t result);
- };
-
- #endif
|