com.bulletphysics.dynamics
Class SimpleDynamicsWorld

java.lang.Object
  extended by com.bulletphysics.collision.dispatch.CollisionWorld
      extended by com.bulletphysics.dynamics.DynamicsWorld
          extended by com.bulletphysics.dynamics.SimpleDynamicsWorld

public class SimpleDynamicsWorld
extends DynamicsWorld

SimpleDynamicsWorld serves as unit-test and to verify more complicated and optimized dynamics worlds. Please use DiscreteDynamicsWorld instead (or ContinuousDynamicsWorld once it is finished).


Nested Class Summary
 
Nested classes/interfaces inherited from class com.bulletphysics.collision.dispatch.CollisionWorld
CollisionWorld.ClosestConvexResultCallback, CollisionWorld.ClosestRayResultCallback, CollisionWorld.ConvexResultCallback, CollisionWorld.LocalConvexResult, CollisionWorld.LocalRayResult, CollisionWorld.LocalShapeInfo, CollisionWorld.RayResultCallback
 
Constructor Summary
SimpleDynamicsWorld(Dispatcher dispatcher, BroadphaseInterface pairCache, ConstraintSolver constraintSolver, CollisionConfiguration collisionConfiguration)
           
 
Method Summary
 void addRigidBody(RigidBody body)
           
 void clearForces()
           
 void debugDrawWorld()
           
 ConstraintSolver getConstraintSolver()
           
 Vector3f getGravity(Vector3f out)
           
 DynamicsWorldType getWorldType()
           
 void removeRigidBody(RigidBody body)
           
 void setConstraintSolver(ConstraintSolver solver)
           
 void setGravity(Vector3f gravity)
          Once a rigidbody is added to the dynamics world, it will get this gravity assigned.
 int stepSimulation(float timeStep, int maxSubSteps, float fixedTimeStep)
          maxSubSteps/fixedTimeStep for interpolation is currently ignored for SimpleDynamicsWorld, use DiscreteDynamicsWorld instead.
 void synchronizeMotionStates()
           
 void updateAabbs()
           
 
Methods inherited from class com.bulletphysics.dynamics.DynamicsWorld
addAction, addConstraint, addConstraint, addVehicle, getAction, getConstraint, getNumActions, getNumConstraints, getSolverInfo, getWorldUserInfo, removeAction, removeConstraint, removeVehicle, setInternalTickCallback, setWorldUserInfo, stepSimulation, stepSimulation
 
Methods inherited from class com.bulletphysics.collision.dispatch.CollisionWorld
addCollisionObject, addCollisionObject, convexSweepTest, destroy, getBroadphase, getCollisionObjectArray, getDebugDrawer, getDispatcher, getDispatchInfo, getNumCollisionObjects, getPairCache, objectQuerySingle, performDiscreteCollisionDetection, rayTest, rayTestSingle, removeCollisionObject, setBroadphase, setDebugDrawer, updateSingleAabb
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleDynamicsWorld

public SimpleDynamicsWorld(Dispatcher dispatcher,
                           BroadphaseInterface pairCache,
                           ConstraintSolver constraintSolver,
                           CollisionConfiguration collisionConfiguration)
Method Detail

stepSimulation

public int stepSimulation(float timeStep,
                          int maxSubSteps,
                          float fixedTimeStep)
maxSubSteps/fixedTimeStep for interpolation is currently ignored for SimpleDynamicsWorld, use DiscreteDynamicsWorld instead.

Specified by:
stepSimulation in class DynamicsWorld

clearForces

public void clearForces()
Specified by:
clearForces in class DynamicsWorld

setGravity

public void setGravity(Vector3f gravity)
Description copied from class: DynamicsWorld
Once a rigidbody is added to the dynamics world, it will get this gravity assigned. Existing rigidbodies in the world get gravity assigned too, during this method.

Specified by:
setGravity in class DynamicsWorld

getGravity

public Vector3f getGravity(Vector3f out)
Specified by:
getGravity in class DynamicsWorld

addRigidBody

public void addRigidBody(RigidBody body)
Specified by:
addRigidBody in class DynamicsWorld

removeRigidBody

public void removeRigidBody(RigidBody body)
Specified by:
removeRigidBody in class DynamicsWorld

updateAabbs

public void updateAabbs()
Overrides:
updateAabbs in class CollisionWorld

synchronizeMotionStates

public void synchronizeMotionStates()

setConstraintSolver

public void setConstraintSolver(ConstraintSolver solver)
Specified by:
setConstraintSolver in class DynamicsWorld

getConstraintSolver

public ConstraintSolver getConstraintSolver()
Specified by:
getConstraintSolver in class DynamicsWorld

debugDrawWorld

public void debugDrawWorld()
Specified by:
debugDrawWorld in class DynamicsWorld

getWorldType

public DynamicsWorldType getWorldType()
Specified by:
getWorldType in class DynamicsWorld