public abstract class DynamicsWorld extends CollisionWorld
CollisionWorld.ClosestConvexResultCallback, CollisionWorld.ClosestRayResultCallback, CollisionWorld.ConvexResultCallback, CollisionWorld.LocalConvexResult, CollisionWorld.LocalRayResult, CollisionWorld.LocalShapeInfo, CollisionWorld.RayResultCallback| Constructor and Description |
|---|
DynamicsWorld(Dispatcher dispatcher,
BroadphaseInterface broadphasePairCache,
CollisionConfiguration collisionConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAction(ActionInterface action) |
void |
addConstraint(TypedConstraint constraint) |
void |
addConstraint(TypedConstraint constraint,
boolean disableCollisionsBetweenLinkedBodies) |
abstract void |
addRigidBody(RigidBody body) |
void |
addVehicle(RaycastVehicle vehicle) |
abstract void |
clearForces() |
abstract void |
debugDrawWorld() |
ActionInterface |
getAction(int index) |
TypedConstraint |
getConstraint(int index) |
abstract ConstraintSolver |
getConstraintSolver() |
abstract Vector3f |
getGravity(Vector3f out) |
int |
getNumActions() |
int |
getNumConstraints() |
ContactSolverInfo |
getSolverInfo() |
abstract DynamicsWorldType |
getWorldType() |
Object |
getWorldUserInfo() |
void |
removeAction(ActionInterface action) |
void |
removeConstraint(TypedConstraint constraint) |
abstract void |
removeRigidBody(RigidBody body) |
void |
removeVehicle(RaycastVehicle vehicle) |
abstract void |
setConstraintSolver(ConstraintSolver solver) |
abstract void |
setGravity(Vector3f gravity)
Once a rigidbody is added to the dynamics world, it will get this gravity assigned.
|
void |
setInternalTickCallback(InternalTickCallback cb,
Object worldUserInfo)
Set the callback for when an internal tick (simulation substep) happens, optional user info.
|
void |
setWorldUserInfo(Object worldUserInfo) |
int |
stepSimulation(float timeStep) |
int |
stepSimulation(float timeStep,
int maxSubSteps) |
abstract int |
stepSimulation(float timeStep,
int maxSubSteps,
float fixedTimeStep)
Proceeds the simulation over 'timeStep', units in preferably in seconds.
|
addCollisionObject, addCollisionObject, convexSweepTest, destroy, getBroadphase, getCollisionObjectArray, getDebugDrawer, getDispatcher, getDispatchInfo, getNumCollisionObjects, getPairCache, objectQuerySingle, performDiscreteCollisionDetection, rayTest, rayTestSingle, removeCollisionObject, setBroadphase, setDebugDrawer, updateAabbs, updateSingleAabbpublic DynamicsWorld(Dispatcher dispatcher, BroadphaseInterface broadphasePairCache, CollisionConfiguration collisionConfiguration)
public final int stepSimulation(float timeStep)
public final int stepSimulation(float timeStep,
int maxSubSteps)
public abstract int stepSimulation(float timeStep,
int maxSubSteps,
float fixedTimeStep)
By default, Bullet will subdivide the timestep in constant substeps of each 'fixedTimeStep'.
In order to keep the simulation real-time, the maximum number of substeps can be clamped to 'maxSubSteps'.
You can disable subdividing the timestep/substepping by passing maxSubSteps=0 as second argument to stepSimulation, but in that case you have to keep the timeStep constant.
public abstract void debugDrawWorld()
public final void addConstraint(TypedConstraint constraint)
public void addConstraint(TypedConstraint constraint, boolean disableCollisionsBetweenLinkedBodies)
public void removeConstraint(TypedConstraint constraint)
public void addAction(ActionInterface action)
public void removeAction(ActionInterface action)
public void addVehicle(RaycastVehicle vehicle)
public void removeVehicle(RaycastVehicle vehicle)
public abstract void setGravity(Vector3f gravity)
public abstract void addRigidBody(RigidBody body)
public abstract void removeRigidBody(RigidBody body)
public abstract void setConstraintSolver(ConstraintSolver solver)
public abstract ConstraintSolver getConstraintSolver()
public int getNumConstraints()
public TypedConstraint getConstraint(int index)
public int getNumActions()
public ActionInterface getAction(int index)
public abstract DynamicsWorldType getWorldType()
public abstract void clearForces()
public void setInternalTickCallback(InternalTickCallback cb, Object worldUserInfo)
public void setWorldUserInfo(Object worldUserInfo)
public Object getWorldUserInfo()
public ContactSolverInfo getSolverInfo()