diff options
Diffstat (limited to 'src/math/mat4.h')
-rw-r--r-- | src/math/mat4.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/math/mat4.h b/src/math/mat4.h index 66d6cd2..35b1ad2 100644 --- a/src/math/mat4.h +++ b/src/math/mat4.h @@ -11,6 +11,7 @@ class Matrix4 { static Matrix4 idty(); static Matrix4 translate(Vector3 v); static Matrix4 scale(float fac); + static Matrix4 scale(Vector3 facs); static Matrix4 rot_x(float a); static Matrix4 rot_y(float a); static Matrix4 rot_z(float a); @@ -18,13 +19,13 @@ class Matrix4 { std::array<float, 16> values; - Matrix4 operator+(); - Matrix4 operator-(); - Matrix4 operator+(Matrix4 m); - Matrix4 operator-(Matrix4 m); - Matrix4 operator*(Matrix4 m); - Vector4 operator*(Vector4 v); - std::array<Vector4, 4> to_vecs(); + Matrix4 operator+() const; + Matrix4 operator-() const; + Matrix4 operator+(Matrix4 m) const; + Matrix4 operator-(Matrix4 m) const; + Matrix4 operator*(Matrix4 m) const; + Vector4 operator*(Vector4 v) const; + std::array<Vector4, 4> to_vecs() const; }; Matrix4 operator*(float fac, Matrix4 m); |