Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
btCollisionWorld Class Reference

CollisionWorld is interface and container for the collision detection. More...

#include <btCollisionWorld.h>

Inheritance diagram for btCollisionWorld:
Inheritance graph
[legend]

List of all members.

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 btBroadphaseInterfacegetBroadphase () const
btBroadphaseInterfacegetBroadphase ()
btCollisionObjectArraygetCollisionObjectArray ()
const btCollisionObjectArraygetCollisionObjectArray () const
virtual btIDebugDrawgetDebugDrawer ()
btDispatchergetDispatcher ()
const btDispatchergetDispatcher () const
btDispatcherInfogetDispatchInfo ()
const btDispatcherInfogetDispatchInfo () const
bool getForceUpdateAllAabbs () const
int getNumCollisionObjects () const
btOverlappingPairCachegetPairCache ()
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

btBroadphaseInterfacem_broadphasePairCache
btAlignedObjectArray
< btCollisionObject * > 
m_collisionObjects
btIDebugDrawm_debugDrawer
btDispatcherm_dispatcher1
btDispatcherInfo m_dispatchInfo
bool m_forceUpdateAllAabbs
btStackAllocm_stackAlloc

Detailed Description

CollisionWorld is interface and container for the collision detection.

Definition at line 82 of file btCollisionWorld.h.


Constructor & Destructor Documentation

btCollisionWorld::btCollisionWorld ( btDispatcher dispatcher,
btBroadphaseInterface broadphasePairCache,
btCollisionConfiguration collisionConfiguration 
)
virtual btCollisionWorld::~btCollisionWorld ( ) [virtual]

Member Function Documentation

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]

Definition at line 118 of file btCollisionWorld.h.

Definition at line 123 of file btCollisionWorld.h.

Definition at line 469 of file btCollisionWorld.h.

Definition at line 474 of file btCollisionWorld.h.

virtual btIDebugDraw* btCollisionWorld::getDebugDrawer ( ) [inline, virtual]

Definition at line 153 of file btCollisionWorld.h.

Definition at line 134 of file btCollisionWorld.h.

const btDispatcher* btCollisionWorld::getDispatcher ( ) const [inline]

Definition at line 139 of file btCollisionWorld.h.

Definition at line 484 of file btCollisionWorld.h.

Definition at line 489 of file btCollisionWorld.h.

Definition at line 494 of file btCollisionWorld.h.

Definition at line 429 of file btCollisionWorld.h.

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::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]
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]

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)

Member Data Documentation

Definition at line 96 of file btCollisionWorld.h.

Definition at line 88 of file btCollisionWorld.h.

Definition at line 98 of file btCollisionWorld.h.

Definition at line 90 of file btCollisionWorld.h.

Definition at line 92 of file btCollisionWorld.h.

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.

Definition at line 94 of file btCollisionWorld.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


bullet
Author(s): Erwin Coumans, ROS package maintained by Tully Foote
autogenerated on Wed Oct 31 2012 07:54:32