class
#include <esp/physics/bullet/BulletBase.h>
BulletBase This class is intended to implement bullet-specific.
Contents
Derived classes
- class BulletRigidObject
- An individual rigid object instance implementing an interface with Bullet physics to enable dynamic objects. See btRigidBody for RigidObjectType::OBJECT.
- class BulletRigidScene
- An individual rigid scene instance implementing an interface with Bullet physics to enable dynamics. See btCollisionObject.
Constructors, destructors, conversion operators
-
BulletBase(std::
shared_ptr<btMultiBodyDynamicsWorld> bWorld, std:: shared_ptr<std:: map<const btCollisionObject*, int>> collisionObjToObjIds) - ~BulletBase() virtual
- Destructor cleans up simulation structures for the object.
Public functions
- auto getMargin() const -> double virtual
- Get the scalar collision margin of an object. Retun 0.0 for a RigidObjectType::SCENE. See btCompoundShape::
getMargin. -
void setMargin(CORRADE_
UNUSED const double margin) virtual - Set the scalar collision margin of an object. Does not affect RigidObjectType::SCENE. See btCompoundShape::
setMargin. -
auto getCollisionShapeAabb() const -> const Magnum::
Range3D pure virtual - Query the Aabb from bullet physics for the root compound shape of the rigid body in its local space. See btCompoundShape::
getAabb.
Protected variables
-
std::
shared_ptr<btMultiBodyDynamicsWorld> bWorld_ - A pointer to the Bullet world to which this object belongs. See btMultiBodyDynamicsWorld.
-
std::
vector<std:: unique_ptr<btCollisionObject>> bStaticCollisionObjects_ - Static data: All components of a RigidObjectType::SCENE are stored here. See btCollisionObject. Also, all objects set to STATIC are stored here.
-
std::
shared_ptr<std:: map<const btCollisionObject*, int>> collisionObjToObjIds_
Function documentation
double esp:: physics:: BulletBase:: getMargin() const virtual
Get the scalar collision margin of an object. Retun 0.0 for a RigidObjectType::SCENE. See btCompoundShape::
Returns | The scalar collision margin of the object. |
---|
void esp:: physics:: BulletBase:: setMargin(CORRADE_ UNUSED const double margin) virtual
Set the scalar collision margin of an object. Does not affect RigidObjectType::SCENE. See btCompoundShape::
Parameters | |
---|---|
margin | The new scalar collision margin of the object. |
const Magnum:: Range3D esp:: physics:: BulletBase:: getCollisionShapeAabb() const pure virtual
Query the Aabb from bullet physics for the root compound shape of the rigid body in its local space. See btCompoundShape::
Returns | The Aabb. |
---|
Variable documentation
std:: shared_ptr<std:: map<const btCollisionObject*, int>> esp:: physics:: BulletBase:: collisionObjToObjIds_ protected
keep a map of collision objects to object ids for quick lookups from Bullet collision checking.