Blender V2.61 - r43446
Public Member Functions | Static Public Member Functions | Protected Member Functions

btSoftRigidDynamicsWorld Class Reference

#include <btSoftRigidDynamicsWorld.h>

Inheritance diagram for btSoftRigidDynamicsWorld:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 btSoftRigidDynamicsWorld (btDispatcher *dispatcher, btBroadphaseInterface *pairCache, btConstraintSolver *constraintSolver, btCollisionConfiguration *collisionConfiguration, btSoftBodySolver *softBodySolver=0)
virtual ~btSoftRigidDynamicsWorld ()
virtual void debugDrawWorld ()
void addSoftBody (btSoftBody *body, short int collisionFilterGroup=btBroadphaseProxy::DefaultFilter, short int collisionFilterMask=btBroadphaseProxy::AllFilter)
void removeSoftBody (btSoftBody *body)
virtual void removeCollisionObject (btCollisionObject *collisionObject)
 removeCollisionObject will first check if it is a rigid body, if so call removeRigidBody otherwise call btDiscreteDynamicsWorld::removeCollisionObject
int getDrawFlags () const
void setDrawFlags (int f)
btSoftBodyWorldInfogetWorldInfo ()
const btSoftBodyWorldInfogetWorldInfo () const
btSoftBodyArraygetSoftBodyArray ()
const btSoftBodyArraygetSoftBodyArray () const
virtual void rayTest (const btVector3 &rayFromWorld, const btVector3 &rayToWorld, RayResultCallback &resultCallback) const
virtual void serialize (btSerializer *serializer)
 Preliminary serialization test for Bullet 2.76. Loading those files requires a separate parser (see Bullet/Demos/SerializeDemo)

Static Public Member Functions

static void rayTestSingle (const btTransform &rayFromTrans, const btTransform &rayToTrans, btCollisionObject *collisionObject, const btCollisionShape *collisionShape, const btTransform &colObjWorldTransform, RayResultCallback &resultCallback)

Protected Member Functions

virtual void predictUnconstraintMotion (btScalar timeStep)
virtual void internalSingleStepSimulation (btScalar timeStep)
void solveSoftBodiesConstraints (btScalar timeStep)
void serializeSoftBodies (btSerializer *serializer)

Detailed Description

Definition at line 26 of file btSoftRigidDynamicsWorld.h.


Constructor & Destructor Documentation

btSoftRigidDynamicsWorld::btSoftRigidDynamicsWorld ( btDispatcher dispatcher,
btBroadphaseInterface pairCache,
btConstraintSolver constraintSolver,
btCollisionConfiguration collisionConfiguration,
btSoftBodySolver softBodySolver = 0 
)
btSoftRigidDynamicsWorld::~btSoftRigidDynamicsWorld ( ) [virtual]

Member Function Documentation

void btSoftRigidDynamicsWorld::addSoftBody ( btSoftBody body,
short int  collisionFilterGroup = btBroadphaseProxy::DefaultFilter,
short int  collisionFilterMask = btBroadphaseProxy::AllFilter 
)
void btSoftRigidDynamicsWorld::debugDrawWorld ( ) [virtual]
int btSoftRigidDynamicsWorld::getDrawFlags ( ) const [inline]

Definition at line 64 of file btSoftRigidDynamicsWorld.h.

btSoftBodyArray& btSoftRigidDynamicsWorld::getSoftBodyArray ( ) [inline]

Definition at line 77 of file btSoftRigidDynamicsWorld.h.

Referenced by internalSingleStepSimulation().

const btSoftBodyArray& btSoftRigidDynamicsWorld::getSoftBodyArray ( ) const [inline]

Definition at line 82 of file btSoftRigidDynamicsWorld.h.

btSoftBodyWorldInfo& btSoftRigidDynamicsWorld::getWorldInfo ( ) [inline]
const btSoftBodyWorldInfo& btSoftRigidDynamicsWorld::getWorldInfo ( ) const [inline]

Definition at line 71 of file btSoftRigidDynamicsWorld.h.

void btSoftRigidDynamicsWorld::internalSingleStepSimulation ( btScalar  timeStep) [protected, virtual]
void btSoftRigidDynamicsWorld::predictUnconstraintMotion ( btScalar  timeStep) [protected, virtual]

Reimplemented from btDiscreteDynamicsWorld.

Definition at line 74 of file btSoftRigidDynamicsWorld.cpp.

References BT_PROFILE, and btSoftBodySolver::predictMotion().

void btSoftRigidDynamicsWorld::rayTest ( const btVector3 &  rayFromWorld,
const btVector3 &  rayToWorld,
RayResultCallback resultCallback 
) const [virtual]

rayTest performs a raycast on all objects in the btCollisionWorld, and calls the resultCallback This allows for several queries: first hit, all hits, any hit, dependent on the value returned by the callback.

use the broadphase to accelerate the search for objects, based on their aabb and for each object with ray-aabb overlap, perform an exact ray test

use the broadphase to accelerate the search for objects, based on their aabb and for each object with ray-aabb overlap, perform an exact ray test

Reimplemented from btCollisionWorld.

Definition at line 264 of file btSoftRigidDynamicsWorld.cpp.

References BT_PROFILE, btCollisionWorld::getNumCollisionObjects(), i, btCollisionWorld::m_broadphasePairCache, btCollisionWorld::m_collisionObjects, btSoftSingleRayCallback::process(), and btBroadphaseInterface::rayTest().

Referenced by CcdPhysicsEnvironment::processFhSprings(), and CcdPhysicsEnvironment::rayTest().

void btSoftRigidDynamicsWorld::rayTestSingle ( const btTransform rayFromTrans,
const btTransform rayToTrans,
btCollisionObject *  collisionObject,
const btCollisionShape collisionShape,
const btTransform colObjWorldTransform,
RayResultCallback resultCallback 
) [static]

rayTestSingle performs a raycast call and calls the resultCallback. It is used internally by rayTest. In a future implementation, we consider moving the ray test as a virtual method in btCollisionShape. This allows more customization.

Reimplemented from btCollisionWorld.

Definition at line 283 of file btSoftRigidDynamicsWorld.cpp.

References btCollisionWorld::RayResultCallback::addSingleResult(), btSoftBody::sRayCast::fraction, btTransform::getOrigin(), btSoftBody::sRayCast::index, btCollisionShape::isSoftBody(), btCollisionWorld::RayResultCallback::m_closestHitFraction, btSoftBody::m_faces, btCollisionWorld::LocalShapeInfo::m_shapePart, btCollisionWorld::LocalShapeInfo::m_triangleIndex, btSoftBody::rayTest(), and btSoftBody::upcast().

Referenced by btSoftSingleRayCallback::process().

void btSoftRigidDynamicsWorld::removeCollisionObject ( btCollisionObject *  collisionObject) [virtual]
void btSoftRigidDynamicsWorld::removeSoftBody ( btSoftBody body)
void btSoftRigidDynamicsWorld::serialize ( btSerializer serializer) [virtual]

Preliminary serialization test for Bullet 2.76. Loading those files requires a separate parser (see Bullet/Demos/SerializeDemo)

Reimplemented from btDiscreteDynamicsWorld.

Definition at line 344 of file btSoftRigidDynamicsWorld.cpp.

References btSerializer::finishSerialization(), btCollisionWorld::serializeCollisionObjects(), btDiscreteDynamicsWorld::serializeRigidBodies(), serializeSoftBodies(), and btSerializer::startSerialization().

void btSoftRigidDynamicsWorld::serializeSoftBodies ( btSerializer serializer) [protected]
void btSoftRigidDynamicsWorld::setDrawFlags ( int  f) [inline]

Definition at line 65 of file btSoftRigidDynamicsWorld.h.

void btSoftRigidDynamicsWorld::solveSoftBodiesConstraints ( btScalar  timeStep) [protected]

The documentation for this class was generated from the following files: