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