summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/rotation.h
diff options
context:
space:
mode:
Diffstat (limited to 'facetracknoir/rotation.h')
-rw-r--r--facetracknoir/rotation.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/facetracknoir/rotation.h b/facetracknoir/rotation.h
index e97ec0f0..747a23f9 100644
--- a/facetracknoir/rotation.h
+++ b/facetracknoir/rotation.h
@@ -9,15 +9,15 @@
#define ROTATION_H
#include <cmath>
// ----------------------------------------------------------------------------
-class Rotation {
+class RotationType {
public:
- Rotation() : a(1.0),b(0.0),c(0.0),d(0.0) {}
- Rotation(double yaw, double pitch, double roll) { fromEuler(yaw, pitch, roll); }
- Rotation(double a, double b, double c, double d) : a(a),b(b),c(c),d(d) {}
+ RotationType() : a(1.0),b(0.0),c(0.0),d(0.0) {}
+ RotationType(double yaw, double pitch, double roll) { fromEuler(yaw, pitch, roll); }
+ RotationType(double a, double b, double c, double d) : a(a),b(b),c(c),d(d) {}
- Rotation inv(){ // inverse
- return Rotation(a,-b,-c, -d);
+ RotationType inv(){ // inverse
+ return RotationType(a,-b,-c, -d);
}
@@ -46,10 +46,10 @@ public:
yaw = atan2(2.0*(a*d + b*c), 1.0 - 2.0*(c*c + d*d));
}
- const Rotation operator*(const Rotation& B)
+ const RotationType operator*(const RotationType& B)
{
- const Rotation& A = *this;
- return Rotation(A.a*B.a - A.b*B.b - A.c*B.c - A.d*B.d, // quaternion multiplication
+ const RotationType& A = *this;
+ return RotationType(A.a*B.a - A.b*B.b - A.c*B.c - A.d*B.d, // quaternion multiplication
A.a*B.b + A.b*B.a + A.c*B.d - A.d*B.c,
A.a*B.c - A.b*B.d + A.c*B.a + A.d*B.b,
A.a*B.d + A.b*B.c - A.c*B.b + A.d*B.a);