Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/axis.cc')
-rw-r--r--src/math/axis.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/math/axis.cc b/src/math/axis.cc
index 3710c89..60d3797 100644
--- a/src/math/axis.cc
+++ b/src/math/axis.cc
@@ -44,6 +44,17 @@ void Axis::assign(const btMatrix3x3 & other)
}
}
+void Axis::assign(const float yaw, const float pitch, const float roll)
+{
+ clear();
+ if (yaw)
+ change_direction(yaw);
+ if (pitch)
+ change_pitch(-pitch);
+ if (roll)
+ change_roll(-roll);
+}
+
Axis & Axis::operator=(const Axis & other)
{
assign(other);