123456789101112131415161718192021222324252627282930313233343536 |
- #ifndef MATRIX_H
- #define MATRIX_H
- #include <iostream>
- class Matrix final
- {
- public:
- Matrix();
-
- void setToIdentity();
- void set(unsigned int index, float f);
-
- const float* getValues() const;
-
- void mul(const Matrix& 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 rotateX(float degrees);
- void rotateY(float degrees);
- void rotateZ(float degrees);
-
- private:
- float data[16];
- };
- std::ostream& operator<<(std::ostream& os, const Matrix& m);
- #endif
|