15 #include "bulletBoxShape.h"
16 #include "bullet_utils.h"
26 BulletBoxShape(
const LVecBase3 &halfExtents) {
28 btVector3 btHalfExtents = LVecBase3_to_btVector3(halfExtents);
30 _shape =
new btBoxShape(btHalfExtents);
31 _shape->setUserPointer(
this);
39 btCollisionShape *BulletBoxShape::
51 get_half_extents_without_margin()
const {
53 return btVector3_to_LVecBase3(_shape->getHalfExtentsWithoutMargin());
62 get_half_extents_with_margin()
const {
64 return btVector3_to_LVecBase3(_shape->getHalfExtentsWithMargin());
78 LVecBase3 extents(p1.get_x() - p0.get_x() / 2.0,
79 p1.get_y() - p0.get_y() / 2.0,
80 p1.get_z() - p0.get_z() / 2.0);
This is the base class for all three-component vectors and points.
A cuboid collision volume or object.
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
TypeHandle is the identifier used to differentiate C++ class types.