From 4f8c3fd99d21b455e83d2d315be60669b2afc122 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 23 May 2013 23:14:27 +0300 Subject: [PATCH] Add overloads for rotation functions that take axis as three coordinates --- source/matrix.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/matrix.h b/source/matrix.h index 5c20d60c..539a613e 100644 --- a/source/matrix.h +++ b/source/matrix.h @@ -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)); } -- 2.45.2