Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/math/axis.cc9
-rw-r--r--src/math/axis.h2
2 files changed, 11 insertions, 0 deletions
diff --git a/src/math/axis.cc b/src/math/axis.cc
index 3c11de1..f7a1eec 100644
--- a/src/math/axis.cc
+++ b/src/math/axis.cc
@@ -107,6 +107,15 @@ Axis Axis::transpose() const
return t;
}
+Axis Axis::operator*(const Axis &other)
+{
+ Axis t;
+ for (size_t i = 0; i < 3; i++)
+ t.axis_vector[i] = (*this) * other.axis_vector[i];
+
+ return t;
+}
+
// write an axis to a std::ostream
std::ostream &operator<<(std::ostream & os, Axis const & axis)
{
diff --git a/src/math/axis.h b/src/math/axis.h
index 38c68de..3268d60 100644
--- a/src/math/axis.h
+++ b/src/math/axis.h
@@ -49,6 +49,8 @@ public:
}
Axis & operator=(const Axis & other);
+
+ Axis operator*(const Axis &other);
/// change direction, rotate around up vector (positive is left)
void change_direction(const float angle);