From d6e4c4e7c2b1e28961f1dfe2f25ef96ced60b21b Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 17 Oct 2010 17:19:03 +0000 Subject: core bullet physics support, initial vstrafe support --- src/math/axis.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/math/axis.h') diff --git a/src/math/axis.h b/src/math/axis.h index c22568c..d3a5ec6 100644 --- a/src/math/axis.h +++ b/src/math/axis.h @@ -10,7 +10,7 @@ #include #include "math/vector3f.h" - +#include "LinearMath/btMatrix3x3.h" namespace math { @@ -24,6 +24,8 @@ public: void clear(); void assign(const Axis & other); + + void assign(const btMatrix3x3 & other); /// global coordinates of the X-axis in the local coordinates system inline const Vector3f & forward() const { @@ -86,6 +88,14 @@ private: Vector3f axis_vector[3]; }; +/// helper function to conver math::Axis to btMatrix3x3 +inline btMatrix3x3 to_btMatrix3x3(const math::Axis &a) +{ + return btMatrix3x3(a[0][0], a[0][1], a[0][2], + a[1][0], a[1][1], a[1][2], + a[2][0], a[2][1], a[2][2]); +} + /// write an axis to a std::ostream std::ostream &operator<<(std::ostream & os, const Axis & axis); -- cgit v1.2.3