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/vector3f.h')
-rw-r--r--src/math/vector3f.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/math/vector3f.h b/src/math/vector3f.h
index 09e6e84..a7437aa 100644
--- a/src/math/vector3f.h
+++ b/src/math/vector3f.h
@@ -10,6 +10,8 @@
#include <iostream>
#include "math/vector3f.h"
+#include "LinearMath/btVector3.h"
+
namespace math
{
@@ -49,6 +51,9 @@ public:
/// assignment
void assign(const Vector3f & other);
+
+ /// assign bullet btVector3 value
+ void assign(const btVector3 & other);
/// assignment operator
Vector3f& operator=(const Vector3f &other);
@@ -214,6 +219,12 @@ float distance(const Vector3f& first, const Vector3f& second);
/// distance between two vectors squared
float distancesquared(const Vector3f& first, const Vector3f& second);
+/// helper function to convert Vector3f to btVector3
+inline btVector3 to_btVector3(const math::Vector3f & v)
+{
+ return btVector3(v[0], v[1], v[2]);
+}
+
} // namespace math
#endif // __INCLUDED_MATH_VECTOR3F_H__