69#ifndef BT_COLLISION_WORLD_H
70#define BT_COLLISION_WORLD_H
253 if (normalInWorldSpace)
289 if (normalInWorldSpace)
385 if (normalInWorldSpace)
434 virtual void rayTest(
const btVector3& rayFromWorld,
const btVector3& rayToWorld, RayResultCallback& resultCallback)
const;
455 RayResultCallback& resultCallback);
459 RayResultCallback& resultCallback);
466 ConvexResultCallback& resultCallback,
btScalar allowedPenetration);
470 ConvexResultCallback& resultCallback,
btScalar allowedPenetration);
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
int size() const
return the number of elements in the array
void push_back(const T &_Val)
The btBroadphaseInterface class provides an interface to detect aabb-overlapping object pairs.
virtual btOverlappingPairCache * getOverlappingPairCache()=0
btCollisionConfiguration allows to configure Bullet collision detection stack allocator size,...
btCollisionObject can be used to manage collision detection objects.
btTransform & getWorldTransform()
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
CollisionWorld is interface and container for the collision detection.
virtual void rayTest(const btVector3 &rayFromWorld, const btVector3 &rayToWorld, RayResultCallback &resultCallback) const
rayTest performs a raycast on all objects in the btCollisionWorld, and calls the resultCallback This ...
virtual void updateAabbs()
btDispatcherInfo m_dispatchInfo
btDispatcher * getDispatcher()
btDispatcherInfo & getDispatchInfo()
virtual void serialize(btSerializer *serializer)
Preliminary serialization test for Bullet 2.76. Loading those files requires a separate parser (Bulle...
virtual void debugDrawWorld()
btOverlappingPairCache * getPairCache()
static void objectQuerySingleInternal(const btConvexShape *castShape, const btTransform &convexFromTrans, const btTransform &convexToTrans, const btCollisionObjectWrapper *colObjWrap, ConvexResultCallback &resultCallback, btScalar allowedPenetration)
virtual btIDebugDraw * getDebugDrawer()
virtual ~btCollisionWorld()
virtual void refreshBroadphaseProxy(btCollisionObject *collisionObject)
btBroadphaseInterface * m_broadphasePairCache
void updateSingleAabb(btCollisionObject *colObj)
void setForceUpdateAllAabbs(bool forceUpdateAllAabbs)
virtual void removeCollisionObject(btCollisionObject *collisionObject)
virtual void addCollisionObject(btCollisionObject *collisionObject, int collisionFilterGroup=btBroadphaseProxy::DefaultFilter, int collisionFilterMask=btBroadphaseProxy::AllFilter)
btAlignedObjectArray< btCollisionObject * > m_collisionObjects
virtual void setDebugDrawer(btIDebugDraw *debugDrawer)
btCollisionWorld(btDispatcher *dispatcher, btBroadphaseInterface *broadphasePairCache, btCollisionConfiguration *collisionConfiguration)
for debug drawing
int getNumCollisionObjects() const
virtual void performDiscreteCollisionDetection()
btCollisionObjectArray & getCollisionObjectArray()
static void rayTestSingleInternal(const btTransform &rayFromTrans, const btTransform &rayToTrans, const btCollisionObjectWrapper *collisionObjectWrap, RayResultCallback &resultCallback)
const btCollisionObjectArray & getCollisionObjectArray() const
void 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 resultC...
bool m_forceUpdateAllAabbs
m_forceUpdateAllAabbs can be set to false as an optimization to only update active object AABBs it is...
const btDispatcherInfo & getDispatchInfo() const
btIDebugDraw * m_debugDrawer
btBroadphaseInterface * getBroadphase()
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....
btDispatcher * m_dispatcher1
void contactPairTest(btCollisionObject *colObjA, btCollisionObject *colObjB, ContactResultCallback &resultCallback)
contactTest performs a discrete collision test between two collision objects and calls the resultCall...
void serializeContactManifolds(btSerializer *serializer)
const btDispatcher * getDispatcher() const
bool getForceUpdateAllAabbs() const
virtual void debugDrawObject(const btTransform &worldTransform, const btCollisionShape *shape, const btVector3 &color)
static void rayTestSingle(const btTransform &rayFromTrans, const btTransform &rayToTrans, btCollisionObject *collisionObject, const btCollisionShape *collisionShape, const btTransform &colObjWorldTransform, RayResultCallback &resultCallback)
rayTestSingle performs a raycast call and calls the resultCallback.
void setBroadphase(btBroadphaseInterface *pairCache)
const btBroadphaseInterface * getBroadphase() const
void contactTest(btCollisionObject *colObj, ContactResultCallback &resultCallback)
contactTest performs a discrete collision test between colObj against all objects in the btCollisionW...
void serializeCollisionObjects(btSerializer *serializer)
virtual void computeOverlappingPairs()
the computeOverlappingPairs is usually already called by performDiscreteCollisionDetection (or stepSi...
The btConvexShape is an abstract shape interface, implemented by all convex shapes such as btBoxShape...
The btDispatcher interface class can be used in combination with broadphase to dispatch calculations ...
The btIDebugDraw interface class allows hooking up a debug renderer to visually debug simulations.
ManifoldContactPoint collects and maintains persistent contactpoints.
The btOverlappingPairCache provides an interface for overlapping pair management (add,...
btVector3 can be used to represent 3D points and vectors.
void setInterpolate3(const btVector3 &v0, const btVector3 &v1, btScalar rt)
The btBroadphaseProxy is the main class that can be used with the Bullet broadphases.
int m_collisionFilterMask
int m_collisionFilterGroup
AllHitsRayResultCallback(const btVector3 &rayFromWorld, const btVector3 &rayToWorld)
virtual btScalar addSingleResult(LocalRayResult &rayResult, bool normalInWorldSpace)
btAlignedObjectArray< const btCollisionObject * > m_collisionObjects
btAlignedObjectArray< btScalar > m_hitFractions
btAlignedObjectArray< btVector3 > m_hitPointWorld
btAlignedObjectArray< btVector3 > m_hitNormalWorld
btVector3 m_hitNormalWorld
const btCollisionObject * m_hitCollisionObject
btVector3 m_convexToWorld
virtual btScalar addSingleResult(LocalConvexResult &convexResult, bool normalInWorldSpace)
ClosestConvexResultCallback(const btVector3 &convexFromWorld, const btVector3 &convexToWorld)
btVector3 m_hitPointWorld
btVector3 m_convexFromWorld
virtual btScalar addSingleResult(LocalRayResult &rayResult, bool normalInWorldSpace)
ClosestRayResultCallback(const btVector3 &rayFromWorld, const btVector3 &rayToWorld)
btVector3 m_hitPointWorld
btVector3 m_hitNormalWorld
RayResultCallback is used to report new raycast results.
int m_collisionFilterMask
virtual bool needsCollision(btBroadphaseProxy *proxy0) const
int m_collisionFilterGroup
btScalar m_closestHitFraction
virtual btScalar addSingleResult(LocalConvexResult &convexResult, bool normalInWorldSpace)=0
virtual ~ConvexResultCallback()
btVector3 m_hitPointLocal
LocalShapeInfo * m_localShapeInfo
btVector3 m_hitNormalLocal
const btCollisionObject * m_hitCollisionObject
LocalConvexResult(const btCollisionObject *hitCollisionObject, LocalShapeInfo *localShapeInfo, const btVector3 &hitNormalLocal, const btVector3 &hitPointLocal, btScalar hitFraction)
LocalShapeInfo * m_localShapeInfo
const btCollisionObject * m_collisionObject
LocalRayResult(const btCollisionObject *collisionObject, LocalShapeInfo *localShapeInfo, const btVector3 &hitNormalLocal, btScalar hitFraction)
btVector3 m_hitNormalLocal
LocalShapeInfo gives extra information for complex shapes Currently, only btTriangleMeshShape is avai...
RayResultCallback is used to report new raycast results.
btScalar m_closestHitFraction
int m_collisionFilterMask
virtual bool needsCollision(btBroadphaseProxy *proxy0) const
virtual btScalar addSingleResult(LocalRayResult &rayResult, bool normalInWorldSpace)=0
int m_collisionFilterGroup
const btCollisionObject * m_collisionObject
virtual ~RayResultCallback()