123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #ifndef MATRIX3D_H
- #define MATRIX3D_H
- #include <iostream>
- class Matrix3D
- {
- public:
- Matrix3D();
- Matrix3D(const Matrix3D& orig);
- virtual ~Matrix3D();
-
- void setToIdentity();
- void set(const Matrix3D& m);
-
- void set(int row, int col, float value);
- float get(int row, int col) const;
-
- const float* getValues() const;
-
- void mul(const Matrix3D& m);
-
- void scale(float sx, float sy, float sz);
-
- void translate(float tx, float ty, float tz);
- void translateX(float tx);
- void translateY(float ty);
- void translateZ(float tz);
- void translateTo(float tx, float ty, float tz);
-
- void rotate(float xDegrees, float yDegrees, float zDegrees);
- void rotateX(float degrees);
- void rotateY(float degrees);
- void rotateZ(float degrees);
- private:
- float data[16];
- };
- std::ostream& operator<<(std::ostream& os, const Matrix3D& m);
- #endif
|