com.bulletphysics.dynamics
Class SimpleDynamicsWorld
java.lang.Object
com.bulletphysics.collision.dispatch.CollisionWorld
com.bulletphysics.dynamics.DynamicsWorld
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).
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 |
SimpleDynamicsWorld
public SimpleDynamicsWorld(Dispatcher dispatcher,
BroadphaseInterface pairCache,
ConstraintSolver constraintSolver,
CollisionConfiguration collisionConfiguration)
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