1234567891011121314151617181920212223242526272829303132333435 |
- #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
|