com.bulletphysics.collision.dispatch
Class GhostObject

java.lang.Object
  extended by com.bulletphysics.collision.dispatch.CollisionObject
      extended by com.bulletphysics.collision.dispatch.GhostObject
Direct Known Subclasses:
PairCachingGhostObject

public class GhostObject
extends CollisionObject

GhostObject can keep track of all objects that are overlapping. By default, this overlap is based on the AABB. This is useful for creating a character controller, collision sensors/triggers, explosions etc.


Field Summary
 
Fields inherited from class com.bulletphysics.collision.dispatch.CollisionObject
ACTIVE_TAG, DISABLE_DEACTIVATION, DISABLE_SIMULATION, ISLAND_SLEEPING, WANTS_DEACTIVATION
 
Constructor Summary
GhostObject()
           
 
Method Summary
 void addOverlappingObjectInternal(BroadphaseProxy otherProxy, BroadphaseProxy thisProxy)
          This method is mainly for expert/internal use only.
 void convexSweepTest(ConvexShape castShape, Transform convexFromWorld, Transform convexToWorld, CollisionWorld.ConvexResultCallback resultCallback, float allowedCcdPenetration)
           
 int getNumOverlappingObjects()
           
 CollisionObject getOverlappingObject(int index)
           
 ObjectArrayList<CollisionObject> getOverlappingPairs()
           
 void rayTest(Vector3f rayFromWorld, Vector3f rayToWorld, CollisionWorld.RayResultCallback resultCallback)
           
 void removeOverlappingObjectInternal(BroadphaseProxy otherProxy, Dispatcher dispatcher, BroadphaseProxy thisProxy)
          This method is mainly for expert/internal use only.
static GhostObject upcast(CollisionObject colObj)
           
 
Methods inherited from class com.bulletphysics.collision.dispatch.CollisionObject
activate, activate, forceActivationState, getActivationState, getBroadphaseHandle, getCcdMotionThreshold, getCcdSquareMotionThreshold, getCcdSweptSphereRadius, getCollisionFlags, getCollisionShape, getCompanionId, getDeactivationTime, getFriction, getHitFraction, getInternalType, getInterpolationAngularVelocity, getInterpolationLinearVelocity, getInterpolationWorldTransform, getIslandTag, getRestitution, getRootCollisionShape, getUserPointer, getWorldTransform, hasContactResponse, checkCollideWith, checkCollideWithOverride, internalSetTemporaryCollisionShape, isActive, isKinematicObject, isStaticObject, isStaticOrKinematicObject, mergesSimulationIslands, setActivationState, setBroadphaseHandle, setCcdMotionThreshold, setCcdSweptSphereRadius, setCollisionFlags, setCollisionShape, setCompanionId, setDeactivationTime, setFriction, setHitFraction, setInterpolationAngularVelocity, setInterpolationLinearVelocity, setInterpolationWorldTransform, setIslandTag, setRestitution, setUserPointer, setWorldTransform
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GhostObject

public GhostObject()
Method Detail

addOverlappingObjectInternal

public void addOverlappingObjectInternal(BroadphaseProxy otherProxy,
                                         BroadphaseProxy thisProxy)
This method is mainly for expert/internal use only.


removeOverlappingObjectInternal

public void removeOverlappingObjectInternal(BroadphaseProxy otherProxy,
                                            Dispatcher dispatcher,
                                            BroadphaseProxy thisProxy)
This method is mainly for expert/internal use only.


convexSweepTest

public void convexSweepTest(ConvexShape castShape,
                            Transform convexFromWorld,
                            Transform convexToWorld,
                            CollisionWorld.ConvexResultCallback resultCallback,
                            float allowedCcdPenetration)

rayTest

public void rayTest(Vector3f rayFromWorld,
                    Vector3f rayToWorld,
                    CollisionWorld.RayResultCallback resultCallback)

getNumOverlappingObjects

public int getNumOverlappingObjects()

getOverlappingObject

public CollisionObject getOverlappingObject(int index)

getOverlappingPairs

public ObjectArrayList<CollisionObject> getOverlappingPairs()

upcast

public static GhostObject upcast(CollisionObject colObj)