16#ifndef BT_GHOST_OBJECT_H
17#define BT_GHOST_OBJECT_H
34btGhostObject : public btCollisionObject
55 return m_overlappingObjects.
size();
60 return m_overlappingObjects[index];
65 return m_overlappingObjects[index];
70 return m_overlappingObjects;
75 return m_overlappingObjects;
82 static const btGhostObject*
upcast(
const btCollisionObject* colObj)
85 return (
const btGhostObject*)colObj;
88 static btGhostObject*
upcast(btCollisionObject * colObj)
91 return (btGhostObject*)colObj;
112 return m_hashPairCache;
130 btCollisionObject* colObj0 = (btCollisionObject*)proxy0->m_clientObject;
131 btCollisionObject* colObj1 = (btCollisionObject*)proxy1->m_clientObject;
132 btGhostObject* ghost0 = btGhostObject::upcast(colObj0);
133 btGhostObject* ghost1 = btGhostObject::upcast(colObj1);
135 ghost0->addOverlappingObjectInternal(proxy1, proxy0);
137 ghost1->addOverlappingObjectInternal(proxy0, proxy1);
143 btCollisionObject* colObj0 = (btCollisionObject*)proxy0->m_clientObject;
144 btCollisionObject* colObj1 = (btCollisionObject*)proxy1->m_clientObject;
145 btGhostObject* ghost0 = btGhostObject::upcast(colObj0);
146 btGhostObject* ghost1 = btGhostObject::upcast(colObj1);
148 ghost0->removeOverlappingObjectInternal(proxy1, dispatcher, proxy0);
150 ghost1->removeOverlappingObjectInternal(proxy0, dispatcher, proxy1);
btConvexShape()
not supported on IBM SDK, until we fix the alignment of btVector3
void convexSweepTest(const class btConvexShape *castShape, const btTransform &convexFromWorld, const btTransform &convexToWorld, btCollisionWorld::ConvexResultCallback &resultCallback, btScalar allowedCcdPenetration=0.f) const
virtual void addOverlappingObjectInternal(btBroadphaseProxy *otherProxy, btBroadphaseProxy *thisProxy=0)
this method is mainly for expert/internal use only.
static const btGhostObject * upcast(const btCollisionObject *colObj)
btCollisionObject * getOverlappingObject(int index)
int getNumOverlappingObjects() const
virtual void removeOverlappingObjectInternal(btBroadphaseProxy *otherProxy, btDispatcher *dispatcher, btBroadphaseProxy *thisProxy=0)
this method is mainly for expert/internal use only.
void rayTest(const btVector3 &rayFromWorld, const btVector3 &rayToWorld, btCollisionWorld::RayResultCallback &resultCallback) const
btAlignedObjectArray< btCollisionObject * > & getOverlappingPairs()
btHashedOverlappingPairCache()
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
#define ATTRIBUTE_ALIGNED16(a)
SIMD_FORCE_INLINE int size() const
return the number of elements in the array
The btGhostPairCallback interfaces and forwards adding and removal of overlapping pairs from the btBr...
virtual btBroadphasePair * addOverlappingPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1)
virtual ~btGhostPairCallback()
virtual void * removeOverlappingPair(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1, btDispatcher *dispatcher)
virtual void removeOverlappingPairsContainingProxy(btBroadphaseProxy *, btDispatcher *)
The btOverlappingPairCallback class is an additional optional broadphase user callback for adding/rem...
btPairCachingGhostObject()
virtual void addOverlappingObjectInternal(btBroadphaseProxy *otherProxy, btBroadphaseProxy *thisProxy=0)
this method is mainly for expert/internal use only.
btHashedOverlappingPairCache * getOverlappingPairCache()
virtual void removeOverlappingObjectInternal(btBroadphaseProxy *otherProxy, btDispatcher *dispatcher, btBroadphaseProxy *thisProxy=0)
virtual ~btPairCachingGhostObject()
RayResultCallback is used to report new raycast results.
RayResultCallback is used to report new raycast results.