BtBody

Engine/source/T3D/physics/bullet/btBody.h

More...

Protected Attributes

btRigidBody *

The physics actor.

The center of mass offset used if the graphical transform is not at the mass center.

The collision representation.

btCompoundShape *

Our local compound if we had to adjust the mass center on a dynamic.

The inverse center of mass offset.

bool

Is the body participating in the physics simulation.

The physics world we are in.

Protected Functions

Public Functions

findContact(SceneObject ** contactObject, VectorF * contactNormal, Vector< SceneObject * > * outOverlapObjects)

Returns the collision shape used to create the body.

getTransform(MatrixF * outMatrix)

Returns the transform of the physics body at the last processed simulation tick.

Returns the physics world this object is a member of.

Returns the world aligned bounding box containing the PhysicsObject.

bool
init(PhysicsCollision * shape, F32 mass, U32 bodyFlags, SceneObject * obj, PhysicsWorld * world)

Initialize the body with a collision shape and basic physics properties.

bool

Returns true if the object is a dynamic rigid body animated by the physics simulation.

bool
setDamping(F32 linear, F32 angular)
setMaterial(F32 restitution, F32 friction, F32 staticFriction)
setSimulationEnabled(bool enabled)

Set false to skip simulation of this object or temporarily remove it from the physics simulation.

setSleeping(bool sleeping)
setSleepThreshold(F32 linear, F32 angular)
setTransform(const MatrixF & transform)

Sets the transform on the physics object.

Detailed Description

Protected Attributes

btRigidBody * mActor 

The physics actor.

MatrixF * mCenterOfMass 

The center of mass offset used if the graphical transform is not at the mass center.

StrongRefPtr< BtCollision > mColShape 

The collision representation.

btCompoundShape * mCompound 

Our local compound if we had to adjust the mass center on a dynamic.

MatrixF * mInvCenterOfMass 

The inverse center of mass offset.

bool mIsDynamic 
bool mIsEnabled 

Is the body participating in the physics simulation.

F32 mMass 
BtWorld * mWorld 

The physics world we are in.

Protected Functions

_releaseActor()

Public Functions

BtBody()

~BtBody()

applyCorrection(const MatrixF & xfm)

Reimplemented from: PhysicsBody

applyForce(const Point3F & force)

Reimplemented from: PhysicsBody

applyImpulse(const Point3F & origin, const Point3F & force)

Reimplemented from: PhysicsBody

applyTorque(const Point3F & torque)

Reimplemented from: PhysicsBody

findContact(SceneObject ** contactObject, VectorF * contactNormal, Vector< SceneObject * > * outOverlapObjects)

Reimplemented from: PhysicsBody

getAngVelocity()

Reimplemented from: PhysicsBody

getCMassPosition()

Reimplemented from: PhysicsBody

getColShape()

Reimplemented from: PhysicsBody

getLinVelocity()

Reimplemented from: PhysicsBody

getMass()

Reimplemented from: PhysicsBody

getState(PhysicsState * outState)

Reimplemented from: PhysicsBody

getTransform(MatrixF * outMatrix)

Reimplemented from: PhysicsObject

getWorld()

Reimplemented from: PhysicsObject

getWorldBounds()

Reimplemented from: PhysicsObject

init(PhysicsCollision * shape, F32 mass, U32 bodyFlags, SceneObject * obj, PhysicsWorld * world)

Reimplemented from: PhysicsBody

isDynamic()

Reimplemented from: PhysicsBody

isSimulationEnabled()

Reimplemented from: PhysicsObject

isValid()

Reimplemented from: PhysicsBody

moveKinematicTo(const MatrixF & xfm)

Reimplemented from: PhysicsBody

setAngVelocity(const Point3F & vel)

Reimplemented from: PhysicsBody

setDamping(F32 linear, F32 angular)

Reimplemented from: PhysicsBody

setLinVelocity(const Point3F & vel)

Reimplemented from: PhysicsBody

setMaterial(F32 restitution, F32 friction, F32 staticFriction)

Reimplemented from: PhysicsBody

setSimulationEnabled(bool enabled)

Reimplemented from: PhysicsObject

setSleeping(bool sleeping)

Reimplemented from: PhysicsBody

setSleepThreshold(F32 linear, F32 angular)

Reimplemented from: PhysicsBody

setTransform(const MatrixF & transform)

Reimplemented from: PhysicsObject