PhysicsBody Class Reference
an interface to the Bullet physics engine, although parameters controlled by PhysicsBody::ComponentListener and its associated LinkComponent
More...
#include <PhysicsBody.h>
Detailed Description
an interface to the Bullet physics engine, although parameters controlled by PhysicsBody::ComponentListener and its associated LinkComponent
Definition at line 21 of file PhysicsBody.h.
List of all members.
Classes |
| class | ComponentListener |
| | This object subscribes to a LinkComponent (usually the root KinematicJoint of a chain) and creates a corresponding PhysicsBodies for it and its children. More...
|
Public Member Functions |
| KinematicJoint & | getLinkComponent () |
| std::string | getPath () const |
| std::string | getModel () const |
| btRigidBody & | getBody () const |
| const btVector3 & | getCenterOffset () const |
| void | getCurrent (fmat::Column< 3 > &pos, fmat::Quaternion &quat) const |
| bool | hasJoint () const |
| float | getJoint () const |
| fmat::Column< 3 > | getInertia () const |
| void | teleport (const fmat::Column< 3 > &pos) |
| | removes from world, then re-builds at new location
|
| void | teleport (const fmat::Quaternion &quat) |
| | removes from world, then re-builds at new location
|
| void | teleport (const fmat::Column< 3 > &pos, const fmat::Quaternion &quat) |
| | removes from world, then re-builds at new location
|
| void | teleport (const btTransform &tr) |
| | removes from world, then re-builds at new location
|
| void | setVelocity (const fmat::Column< 3 > &linear, const fmat::Column< 3 > &angular) |
| | sets a linear and angular velocity (world coordinates), also applies to children
|
| void | setVelocity (const btVector3 &linear, const btVector3 &angular) |
| | sets a linear and angular velocity (world coordinates), also applies to children
|
Protected Member Functions |
| | PhysicsBody (PhysicsWorld &world_, KinematicJoint &link_, const plist::Primitive< float > *pos_, const btTransform &tr, PhysicsBody *parent) |
| | ~PhysicsBody () |
| void | init () |
| void | build () |
| void | buildLink (const KinematicJoint &kj, const fmat::Transform &tr) |
| void | addComponent (const LinkComponent &comp, const fmat::Transform &tr) |
| void | resetTransform () |
| void | clear () |
| void | updateFrictionForce () |
| void | updateAnistropicFriction () |
| void | rebuild () |
Static Protected Member Functions |
| static bool | isChild (const LinkComponent &pb, const LinkComponent &child) |
Protected Attributes |
| PhysicsWorld & | world |
| KinematicJoint & | link |
| const plist::Primitive< float > * | qpos |
| float | totalMass |
| btVector3 | centerOffset |
| btVector3 | inertia |
| btCompoundShape * | compound |
| btRigidBody * | body |
| btGeneric6DofConstraint * | joint |
| ConstraintInterface * | jointInterface |
| MotorController * | jointController |
| btTransform | lastTransform |
| PhysicsBody * | parentBody |
| std::set< PhysicsBody * > | children |
| std::string | collisionDataName |
plist::PrimitiveCallbackMember
< PhysicsBody > | frictionForceListener |
plist::CollectionCallbackMember
< PhysicsBody > | anistropicFrictionListener |
Static Protected Attributes |
static std::map< std::string,
CollisionData * > | collisionData |
Private Member Functions |
| | PhysicsBody (const PhysicsBody &) |
| | do not call
|
| PhysicsBody & | operator= (const PhysicsBody &) |
| | do not call
|
Friends |
| class | PhysicsWorld |
| class | CollisionData |
Constructor & Destructor Documentation
| PhysicsBody::~PhysicsBody |
( |
|
) |
[protected] |
| PhysicsBody::PhysicsBody |
( |
const PhysicsBody & |
|
) |
[private] |
Member Function Documentation
| void PhysicsBody::build |
( |
|
) |
[protected] |
| void PhysicsBody::clear |
( |
|
) |
[protected] |
| btRigidBody& PhysicsBody::getBody |
( |
|
) |
const |
| const btVector3& PhysicsBody::getCenterOffset |
( |
|
) |
const |
| float PhysicsBody::getJoint |
( |
|
) |
const |
| std::string PhysicsBody::getModel |
( |
|
) |
const |
| std::string PhysicsBody::getPath |
( |
|
) |
const |
| bool PhysicsBody::hasJoint |
( |
|
) |
const |
| void PhysicsBody::init |
( |
|
) |
[protected] |
| void PhysicsBody::rebuild |
( |
|
) |
[protected] |
| void PhysicsBody::resetTransform |
( |
|
) |
[protected] |
| void PhysicsBody::setVelocity |
( |
const btVector3 & |
linear, |
|
|
const btVector3 & |
angular | |
|
) |
| | |
sets a linear and angular velocity (world coordinates), also applies to children
sets a linear and angular velocity (world coordinates), also applies to children
| void PhysicsBody::teleport |
( |
const btTransform & |
tr |
) |
|
removes from world, then re-builds at new location
removes from world, then re-builds at new location
removes from world, then re-builds at new location
| void PhysicsBody::teleport |
( |
const fmat::Column< 3 > & |
pos |
) |
|
removes from world, then re-builds at new location
| void PhysicsBody::updateAnistropicFriction |
( |
|
) |
[protected] |
| void PhysicsBody::updateFrictionForce |
( |
|
) |
[protected] |
Friends And Related Function Documentation
friend class CollisionData [friend] |
Member Data Documentation
The documentation for this class was generated from the following file:
|