com.bulletphysics.collision.dispatch
Class CollisionObject

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

public class CollisionObject
extends Object

CollisionObject can be used to manage collision detection objects. It maintains all information that is needed for a collision detection: CollisionShape, Transform and AABB proxy. It can be added to CollisionWorld.


Field Summary
static int ACTIVE_TAG
           
static int DISABLE_DEACTIVATION
           
static int DISABLE_SIMULATION
           
static int ISLAND_SLEEPING
           
static int WANTS_DEACTIVATION
           
 
Constructor Summary
CollisionObject()
           
 
Method Summary
 void activate()
           
 void activate(boolean forceActivation)
           
 void forceActivationState(int newState)
           
 int getActivationState()
           
 BroadphaseProxy getBroadphaseHandle()
           
 float getCcdMotionThreshold()
           
 float getCcdSquareMotionThreshold()
           
 float getCcdSweptSphereRadius()
           
 int getCollisionFlags()
           
 CollisionShape getCollisionShape()
           
 int getCompanionId()
           
 float getDeactivationTime()
           
 float getFriction()
           
 float getHitFraction()
           
 CollisionObjectType getInternalType()
           
 Vector3f getInterpolationAngularVelocity(Vector3f out)
           
 Vector3f getInterpolationLinearVelocity(Vector3f out)
           
 Transform getInterpolationWorldTransform(Transform out)
           
 int getIslandTag()
           
 float getRestitution()
           
 CollisionShape getRootCollisionShape()
           
 Object getUserPointer()
           
 Transform getWorldTransform(Transform out)
           
 boolean hasContactResponse()
           
 boolean checkCollideWith(CollisionObject co)
           
 boolean checkCollideWithOverride(CollisionObject co)
           
 void internalSetTemporaryCollisionShape(CollisionShape collisionShape)
          Avoid using this internal API call.
 boolean isActive()
           
 boolean isKinematicObject()
           
 boolean isStaticObject()
           
 boolean isStaticOrKinematicObject()
           
 boolean mergesSimulationIslands()
           
 void setActivationState(int newState)
           
 void setBroadphaseHandle(BroadphaseProxy broadphaseHandle)
           
 void setCcdMotionThreshold(float ccdMotionThreshold)
           
 void setCcdSweptSphereRadius(float ccdSweptSphereRadius)
           
 void setCollisionFlags(int collisionFlags)
           
 void setCollisionShape(CollisionShape collisionShape)
           
 void setCompanionId(int companionId)
           
 void setDeactivationTime(float deactivationTime)
           
 void setFriction(float friction)
           
 void setHitFraction(float hitFraction)
           
 void setInterpolationAngularVelocity(Vector3f angvel)
           
 void setInterpolationLinearVelocity(Vector3f linvel)
           
 void setInterpolationWorldTransform(Transform interpolationWorldTransform)
           
 void setIslandTag(int islandTag)
           
 void setRestitution(float restitution)
           
 void setUserPointer(Object userObjectPointer)
           
 void setWorldTransform(Transform worldTransform)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTIVE_TAG

public static final int ACTIVE_TAG
See Also:
Constant Field Values

ISLAND_SLEEPING

public static final int ISLAND_SLEEPING
See Also:
Constant Field Values

WANTS_DEACTIVATION

public static final int WANTS_DEACTIVATION
See Also:
Constant Field Values

DISABLE_DEACTIVATION

public static final int DISABLE_DEACTIVATION
See Also:
Constant Field Values

DISABLE_SIMULATION

public static final int DISABLE_SIMULATION
See Also:
Constant Field Values
Constructor Detail

CollisionObject

public CollisionObject()
Method Detail

checkCollideWithOverride

public boolean checkCollideWithOverride(CollisionObject co)

mergesSimulationIslands

public boolean mergesSimulationIslands()

isStaticObject

public boolean isStaticObject()

isKinematicObject

public boolean isKinematicObject()

isStaticOrKinematicObject

public boolean isStaticOrKinematicObject()

hasContactResponse

public boolean hasContactResponse()

getCollisionShape

public CollisionShape getCollisionShape()

setCollisionShape

public void setCollisionShape(CollisionShape collisionShape)

getRootCollisionShape

public CollisionShape getRootCollisionShape()

internalSetTemporaryCollisionShape

public void internalSetTemporaryCollisionShape(CollisionShape collisionShape)
Avoid using this internal API call. internalSetTemporaryCollisionShape is used to temporary replace the actual collision shape by a child collision shape.


getActivationState

public int getActivationState()

setActivationState

public void setActivationState(int newState)

getDeactivationTime

public float getDeactivationTime()

setDeactivationTime

public void setDeactivationTime(float deactivationTime)

forceActivationState

public void forceActivationState(int newState)

activate

public void activate()

activate

public void activate(boolean forceActivation)

isActive

public boolean isActive()

getRestitution

public float getRestitution()

setRestitution

public void setRestitution(float restitution)

getFriction

public float getFriction()

setFriction

public void setFriction(float friction)

getInternalType

public CollisionObjectType getInternalType()

getWorldTransform

public Transform getWorldTransform(Transform out)

setWorldTransform

public void setWorldTransform(Transform worldTransform)

getBroadphaseHandle

public BroadphaseProxy getBroadphaseHandle()

setBroadphaseHandle

public void setBroadphaseHandle(BroadphaseProxy broadphaseHandle)

getInterpolationWorldTransform

public Transform getInterpolationWorldTransform(Transform out)

setInterpolationWorldTransform

public void setInterpolationWorldTransform(Transform interpolationWorldTransform)

setInterpolationLinearVelocity

public void setInterpolationLinearVelocity(Vector3f linvel)

setInterpolationAngularVelocity

public void setInterpolationAngularVelocity(Vector3f angvel)

getInterpolationLinearVelocity

public Vector3f getInterpolationLinearVelocity(Vector3f out)

getInterpolationAngularVelocity

public Vector3f getInterpolationAngularVelocity(Vector3f out)

getIslandTag

public int getIslandTag()

setIslandTag

public void setIslandTag(int islandTag)

getCompanionId

public int getCompanionId()

setCompanionId

public void setCompanionId(int companionId)

getHitFraction

public float getHitFraction()

setHitFraction

public void setHitFraction(float hitFraction)

getCollisionFlags

public int getCollisionFlags()

setCollisionFlags

public void setCollisionFlags(int collisionFlags)

getCcdSweptSphereRadius

public float getCcdSweptSphereRadius()

setCcdSweptSphereRadius

public void setCcdSweptSphereRadius(float ccdSweptSphereRadius)

getCcdMotionThreshold

public float getCcdMotionThreshold()

getCcdSquareMotionThreshold

public float getCcdSquareMotionThreshold()

setCcdMotionThreshold

public void setCcdMotionThreshold(float ccdMotionThreshold)

getUserPointer

public Object getUserPointer()

setUserPointer

public void setUserPointer(Object userObjectPointer)

checkCollideWith

public boolean checkCollideWith(CollisionObject co)