|
@@ -21,7 +21,9 @@ class Obb: public CollisionShape
|
|
|
Obb()
|
|
Obb()
|
|
|
: CollisionShape(CST_OBB)
|
|
: CollisionShape(CST_OBB)
|
|
|
{}
|
|
{}
|
|
|
|
|
+
|
|
|
Obb(const Obb& b);
|
|
Obb(const Obb& b);
|
|
|
|
|
+
|
|
|
Obb(const Vec3& center, const Mat3& rotation, const Vec3& extends);
|
|
Obb(const Vec3& center, const Mat3& rotation, const Vec3& extends);
|
|
|
/// @}
|
|
/// @}
|
|
|
|
|
|
|
@@ -78,18 +80,24 @@ class Obb: public CollisionShape
|
|
|
v.visit(*this);
|
|
v.visit(*this);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- Obb getTransformed(const Transform& transform) const;
|
|
|
|
|
-
|
|
|
|
|
- /// Get a collision shape that includes this and the given. Its not
|
|
|
|
|
- /// very accurate
|
|
|
|
|
- Obb getCompoundShape(const Obb& b) const;
|
|
|
|
|
-
|
|
|
|
|
/// Overrides CollisionShape::testPlane
|
|
/// Overrides CollisionShape::testPlane
|
|
|
float testPlane(const Plane& p) const
|
|
float testPlane(const Plane& p) const
|
|
|
{
|
|
{
|
|
|
return PlaneTests::test(p, *this);
|
|
return PlaneTests::test(p, *this);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /// Overrides CollisionShape::transform
|
|
|
|
|
+ void transform(const Transform& trf)
|
|
|
|
|
+ {
|
|
|
|
|
+ *this = getTransformed(trf);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ Obb getTransformed(const Transform& transform) const;
|
|
|
|
|
+
|
|
|
|
|
+ /// Get a collision shape that includes this and the given. Its not
|
|
|
|
|
+ /// very accurate
|
|
|
|
|
+ Obb getCompoundShape(const Obb& b) const;
|
|
|
|
|
+
|
|
|
/// Calculate from a set of points
|
|
/// Calculate from a set of points
|
|
|
template<typename Container>
|
|
template<typename Container>
|
|
|
void set(const Container& container);
|
|
void set(const Container& container);
|