CollisionWorld is interface and container for the collision detection. More...
#include <btCollisionWorld.h>
Classes | |
struct | AllHitsRayResultCallback |
struct | ClosestConvexResultCallback |
struct | ClosestRayResultCallback |
struct | ContactResultCallback |
ContactResultCallback is used to report contact points. More... | |
struct | ConvexResultCallback |
RayResultCallback is used to report new raycast results. More... | |
struct | LocalConvexResult |
struct | LocalRayResult |
struct | LocalShapeInfo |
struct | RayResultCallback |
RayResultCallback is used to report new raycast results. More... | |
Public Member Functions | |
virtual void | addCollisionObject (btCollisionObject *collisionObject, short int collisionFilterGroup=btBroadphaseProxy::DefaultFilter, short int collisionFilterMask=btBroadphaseProxy::AllFilter) |
btCollisionWorld (btDispatcher *dispatcher, btBroadphaseInterface *broadphasePairCache, btCollisionConfiguration *collisionConfiguration) | |
void | contactPairTest (btCollisionObject *colObjA, btCollisionObject *colObjB, ContactResultCallback &resultCallback) |
void | contactTest (btCollisionObject *colObj, ContactResultCallback &resultCallback) |
void | convexSweepTest (const btConvexShape *castShape, const btTransform &from, const btTransform &to, ConvexResultCallback &resultCallback, btScalar allowedCcdPenetration=btScalar(0.)) const |
virtual void | debugDrawObject (const btTransform &worldTransform, const btCollisionShape *shape, const btVector3 &color) |
virtual void | debugDrawWorld () |
const btBroadphaseInterface * | getBroadphase () const |
btBroadphaseInterface * | getBroadphase () |
btCollisionObjectArray & | getCollisionObjectArray () |
const btCollisionObjectArray & | getCollisionObjectArray () const |
virtual btIDebugDraw * | getDebugDrawer () |
btDispatcher * | getDispatcher () |
const btDispatcher * | getDispatcher () const |
btDispatcherInfo & | getDispatchInfo () |
const btDispatcherInfo & | getDispatchInfo () const |
bool | getForceUpdateAllAabbs () const |
int | getNumCollisionObjects () const |
btOverlappingPairCache * | getPairCache () |
virtual void | performDiscreteCollisionDetection () |
virtual void | rayTest (const btVector3 &rayFromWorld, const btVector3 &rayToWorld, RayResultCallback &resultCallback) const |
virtual void | removeCollisionObject (btCollisionObject *collisionObject) |
virtual void | serialize (btSerializer *serializer) |
Preliminary serialization test for Bullet 2.76. Loading those files requires a separate parser (Bullet/Demos/SerializeDemo) | |
void | setBroadphase (btBroadphaseInterface *pairCache) |
virtual void | setDebugDrawer (btIDebugDraw *debugDrawer) |
void | setForceUpdateAllAabbs (bool forceUpdateAllAabbs) |
virtual void | updateAabbs () |
void | updateSingleAabb (btCollisionObject *colObj) |
virtual | ~btCollisionWorld () |
Static Public Member Functions | |
static void | objectQuerySingle (const btConvexShape *castShape, const btTransform &rayFromTrans, const btTransform &rayToTrans, btCollisionObject *collisionObject, const btCollisionShape *collisionShape, const btTransform &colObjWorldTransform, ConvexResultCallback &resultCallback, btScalar allowedPenetration) |
objectQuerySingle performs a collision detection query and calls the resultCallback. It is used internally by rayTest. | |
static void | rayTestSingle (const btTransform &rayFromTrans, const btTransform &rayToTrans, btCollisionObject *collisionObject, const btCollisionShape *collisionShape, const btTransform &colObjWorldTransform, RayResultCallback &resultCallback) |
Protected Member Functions | |
void | serializeCollisionObjects (btSerializer *serializer) |
Protected Attributes | |
btBroadphaseInterface * | m_broadphasePairCache |
btAlignedObjectArray < btCollisionObject * > | m_collisionObjects |
btIDebugDraw * | m_debugDrawer |
btDispatcher * | m_dispatcher1 |
btDispatcherInfo | m_dispatchInfo |
bool | m_forceUpdateAllAabbs |
btStackAlloc * | m_stackAlloc |
CollisionWorld is interface and container for the collision detection.
Definition at line 82 of file btCollisionWorld.h.
btCollisionWorld::btCollisionWorld | ( | btDispatcher * | dispatcher, |
btBroadphaseInterface * | broadphasePairCache, | ||
btCollisionConfiguration * | collisionConfiguration | ||
) |
virtual btCollisionWorld::~btCollisionWorld | ( | ) | [virtual] |
virtual void btCollisionWorld::addCollisionObject | ( | btCollisionObject * | collisionObject, |
short int | collisionFilterGroup = btBroadphaseProxy::DefaultFilter , |
||
short int | collisionFilterMask = btBroadphaseProxy::AllFilter |
||
) | [virtual] |
Reimplemented in btDiscreteDynamicsWorld.
void btCollisionWorld::contactPairTest | ( | btCollisionObject * | colObjA, |
btCollisionObject * | colObjB, | ||
ContactResultCallback & | resultCallback | ||
) |
contactTest performs a discrete collision test between two collision objects and calls the resultCallback if overlap if detected. it reports one or more contact points (including the one with deepest penetration)
void btCollisionWorld::contactTest | ( | btCollisionObject * | colObj, |
ContactResultCallback & | resultCallback | ||
) |
contactTest performs a discrete collision test between colObj against all objects in the btCollisionWorld, and calls the resultCallback. it reports one or more contact points for every overlapping object (including the one with deepest penetration)
void btCollisionWorld::convexSweepTest | ( | const btConvexShape * | castShape, |
const btTransform & | from, | ||
const btTransform & | to, | ||
ConvexResultCallback & | resultCallback, | ||
btScalar | allowedCcdPenetration = btScalar(0.) |
||
) | const |
convexTest performs a swept convex cast 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 return by the callback.
virtual void btCollisionWorld::debugDrawObject | ( | const btTransform & | worldTransform, |
const btCollisionShape * | shape, | ||
const btVector3 & | color | ||
) | [virtual] |
virtual void btCollisionWorld::debugDrawWorld | ( | ) | [virtual] |
Reimplemented in btDiscreteDynamicsWorld, btDynamicsWorld, btSimpleDynamicsWorld, and btSoftRigidDynamicsWorld.
const btBroadphaseInterface* btCollisionWorld::getBroadphase | ( | ) | const [inline] |
Definition at line 118 of file btCollisionWorld.h.
btBroadphaseInterface* btCollisionWorld::getBroadphase | ( | ) | [inline] |
Definition at line 123 of file btCollisionWorld.h.
Definition at line 469 of file btCollisionWorld.h.
const btCollisionObjectArray& btCollisionWorld::getCollisionObjectArray | ( | ) | const [inline] |
Definition at line 474 of file btCollisionWorld.h.
virtual btIDebugDraw* btCollisionWorld::getDebugDrawer | ( | ) | [inline, virtual] |
Definition at line 153 of file btCollisionWorld.h.
btDispatcher* btCollisionWorld::getDispatcher | ( | ) | [inline] |
Definition at line 134 of file btCollisionWorld.h.
const btDispatcher* btCollisionWorld::getDispatcher | ( | ) | const [inline] |
Definition at line 139 of file btCollisionWorld.h.
btDispatcherInfo& btCollisionWorld::getDispatchInfo | ( | ) | [inline] |
Definition at line 484 of file btCollisionWorld.h.
const btDispatcherInfo& btCollisionWorld::getDispatchInfo | ( | ) | const [inline] |
Definition at line 489 of file btCollisionWorld.h.
bool btCollisionWorld::getForceUpdateAllAabbs | ( | ) | const [inline] |
Definition at line 494 of file btCollisionWorld.h.
int btCollisionWorld::getNumCollisionObjects | ( | ) | const [inline] |
Definition at line 429 of file btCollisionWorld.h.
btOverlappingPairCache* btCollisionWorld::getPairCache | ( | ) | [inline] |
Definition at line 128 of file btCollisionWorld.h.
static void btCollisionWorld::objectQuerySingle | ( | const btConvexShape * | castShape, |
const btTransform & | rayFromTrans, | ||
const btTransform & | rayToTrans, | ||
btCollisionObject * | collisionObject, | ||
const btCollisionShape * | collisionShape, | ||
const btTransform & | colObjWorldTransform, | ||
ConvexResultCallback & | resultCallback, | ||
btScalar | allowedPenetration | ||
) | [static] |
objectQuerySingle performs a collision detection query and calls the resultCallback. It is used internally by rayTest.
virtual void btCollisionWorld::performDiscreteCollisionDetection | ( | ) | [virtual] |
virtual void btCollisionWorld::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.
Reimplemented in btSoftRigidDynamicsWorld.
static void btCollisionWorld::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 in btSoftRigidDynamicsWorld.
virtual void btCollisionWorld::removeCollisionObject | ( | btCollisionObject * | collisionObject | ) | [virtual] |
Reimplemented in btDiscreteDynamicsWorld, btSimpleDynamicsWorld, and btSoftRigidDynamicsWorld.
virtual void btCollisionWorld::serialize | ( | btSerializer * | serializer | ) | [virtual] |
Preliminary serialization test for Bullet 2.76. Loading those files requires a separate parser (Bullet/Demos/SerializeDemo)
Reimplemented in btDiscreteDynamicsWorld, and btSoftRigidDynamicsWorld.
void btCollisionWorld::serializeCollisionObjects | ( | btSerializer * | serializer | ) | [protected] |
void btCollisionWorld::setBroadphase | ( | btBroadphaseInterface * | pairCache | ) | [inline] |
Definition at line 113 of file btCollisionWorld.h.
virtual void btCollisionWorld::setDebugDrawer | ( | btIDebugDraw * | debugDrawer | ) | [inline, virtual] |
Definition at line 148 of file btCollisionWorld.h.
void btCollisionWorld::setForceUpdateAllAabbs | ( | bool | forceUpdateAllAabbs | ) | [inline] |
Definition at line 498 of file btCollisionWorld.h.
virtual void btCollisionWorld::updateAabbs | ( | ) | [virtual] |
Reimplemented in btSimpleDynamicsWorld.
void btCollisionWorld::updateSingleAabb | ( | btCollisionObject * | colObj | ) |
Definition at line 96 of file btCollisionWorld.h.
btAlignedObjectArray<btCollisionObject*> btCollisionWorld::m_collisionObjects [protected] |
Definition at line 88 of file btCollisionWorld.h.
btIDebugDraw* btCollisionWorld::m_debugDrawer [protected] |
Definition at line 98 of file btCollisionWorld.h.
btDispatcher* btCollisionWorld::m_dispatcher1 [protected] |
Definition at line 90 of file btCollisionWorld.h.
btDispatcherInfo btCollisionWorld::m_dispatchInfo [protected] |
Definition at line 92 of file btCollisionWorld.h.
bool btCollisionWorld::m_forceUpdateAllAabbs [protected] |
m_forceUpdateAllAabbs can be set to false as an optimization to only update active object AABBs it is true by default, because it is error-prone (setting the position of static objects wouldn't update their AABB)
Definition at line 102 of file btCollisionWorld.h.
btStackAlloc* btCollisionWorld::m_stackAlloc [protected] |
Definition at line 94 of file btCollisionWorld.h.