com.bulletphysics.collision.dispatch
Class CollisionObject

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

public class CollisionObject
extends java.lang.Object

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


Field Summary
protected  int activationState1
           
static int ACTIVE_TAG
           
protected  BroadphaseProxy broadphaseHandle
           
protected  float ccdSquareMotionThreshold
           
protected  float ccdSweptSphereRadius
           
protected  int collisionFlags
           
protected  CollisionShape collisionShape
           
protected  int companionId
           
protected  float deactivationTime
           
static int DISABLE_DEACTIVATION
           
static int DISABLE_SIMULATION
           
protected  float friction
           
protected  float hitFraction
           
protected  boolean checkCollideWith
           
protected  CollisionObjectType internalType
           
protected  javax.vecmath.Vector3f interpolationAngularVelocity
           
protected  javax.vecmath.Vector3f interpolationLinearVelocity
           
protected  Transform interpolationWorldTransform
           
static int ISLAND_SLEEPING
           
protected  int islandTag1
           
protected  float restitution
           
protected  CollisionShape rootCollisionShape
           
protected  java.lang.Object userObjectPointer
           
static int WANTS_DEACTIVATION
           
protected  Transform worldTransform
           
 
Constructor Summary
CollisionObject()
           
 
Method Summary
 void activate()
           
 void activate(boolean forceActivation)
           
 void forceActivationState(int newState)
           
 int getActivationState()
           
 BroadphaseProxy getBroadphaseHandle()
           
 float getCcdSquareMotionThreshold()
           
 float getCcdSweptSphereRadius()
           
 int getCollisionFlags()
           
 CollisionShape getCollisionShape()
           
 int getCompanionId()
           
 float getDeactivationTime()
           
 float getFriction()
           
 float getHitFraction()
           
 CollisionObjectType getInternalType()
           
 javax.vecmath.Vector3f getInterpolationAngularVelocity(javax.vecmath.Vector3f out)
           
 javax.vecmath.Vector3f getInterpolationLinearVelocity(javax.vecmath.Vector3f out)
           
 Transform getInterpolationWorldTransform(Transform out)
           
 int getIslandTag()
           
 float getRestitution()
           
 CollisionShape getRootCollisionShape()
           
 java.lang.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 setCcdSquareMotionThreshold(float ccdSquareMotionThreshold)
           
 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 setInterpolationWorldTransform(Transform interpolationWorldTransform)
           
 void setIslandTag(int islandTag)
           
 void setRestitution(float restitution)
           
 void setUserPointer(java.lang.Object userObjectPointer)
           
 void setWorldTransform(Transform worldTransform)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, 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

worldTransform

protected Transform worldTransform

interpolationWorldTransform

protected final Transform interpolationWorldTransform

interpolationLinearVelocity

protected final javax.vecmath.Vector3f interpolationLinearVelocity

interpolationAngularVelocity

protected final javax.vecmath.Vector3f interpolationAngularVelocity

broadphaseHandle

protected BroadphaseProxy broadphaseHandle

collisionShape

protected CollisionShape collisionShape

rootCollisionShape

protected CollisionShape rootCollisionShape

collisionFlags

protected int collisionFlags

islandTag1

protected int islandTag1

companionId

protected int companionId

activationState1

protected int activationState1

deactivationTime

protected float deactivationTime

friction

protected float friction

restitution

protected float restitution

userObjectPointer

protected java.lang.Object userObjectPointer

internalType

protected CollisionObjectType internalType

hitFraction

protected float hitFraction

ccdSweptSphereRadius

protected float ccdSweptSphereRadius

ccdSquareMotionThreshold

protected float ccdSquareMotionThreshold

checkCollideWith

protected boolean checkCollideWith
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)

getInterpolationLinearVelocity

public javax.vecmath.Vector3f getInterpolationLinearVelocity(javax.vecmath.Vector3f out)

getInterpolationAngularVelocity

public javax.vecmath.Vector3f getInterpolationAngularVelocity(javax.vecmath.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)

getCcdSquareMotionThreshold

public float getCcdSquareMotionThreshold()

setCcdSquareMotionThreshold

public void setCcdSquareMotionThreshold(float ccdSquareMotionThreshold)

getUserPointer

public java.lang.Object getUserPointer()

setUserPointer

public void setUserPointer(java.lang.Object userObjectPointer)

checkCollideWith

public boolean checkCollideWith(CollisionObject co)