]> git.tdb.fi Git - libs/gl.git/blobdiff - source/matrix.h
Add overloads for rotation functions that take axis as three coordinates
[libs/gl.git] / source / matrix.h
index 5c20d60c7d333b2a4c468bf9c7fcd250dc1ee312..539a613e6966087fbe47cb2002227a41bd7d57b5 100644 (file)
@@ -27,6 +27,7 @@ public:
        void multiply(const Matrix &);
        void translate(double x, double y, double z) { translate(Vector3(x, y, z)); }
        void translate(const Vector3 &);
+       void rotate(const Angle &a, double x, double y, double z) { rotate(a, Vector3(x, y, z)); }
        void rotate(const Angle &, const Vector3 &);
        void rotate(double a, double x, double y, double z) { rotate(Angle::from_radians(a), Vector3(x, y, z)); }
        void rotate(double a, const Vector3 &x) { rotate(Angle::from_radians(a), x); }
@@ -44,7 +45,8 @@ public:
 
        static Matrix translation(double x, double y, double z) { return translation(Vector3(x, y, z)); }
        static Matrix translation(const Vector3 &);
-       static Matrix rotation(const Angle &a, const Vector3 &);
+       static Matrix rotation(const Angle &a, double x, double y, double z) { return rotation(a, Vector3(x, y, z)); }
+       static Matrix rotation(const Angle &, const Vector3 &);
        static Matrix rotation(double a, double x, double y, double z) { return rotation(Angle::from_radians(a), Vector3(x, y, z)); }
        static Matrix rotation(double a, const Vector3 &x) { return rotation(Angle::from_radians(a), x); }
        static Matrix rotation_deg(double a, double x, double y, double z) { return rotation(Angle::from_degrees(a), Vector3(x, y, z)); }