Class ODEWorld
java.lang.Object
org.episteme.nativ.physics.classical.mechanics.collision.backends.ode.ODEWorld
- All Implemented Interfaces:
PhysicsWorldBridge
ODE implementation of PhysicsWorldBackend.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRigidBody(RigidBody body) Adds a rigid body to the simulation.org.ode4j.ode.DWorldvoidremoveRigidBody(RigidBody body) Removes a rigid body from the simulation.voidsetGravity(double gravityX, double gravityY, double gravityZ) Sets the gravity vector for the world.voidstepSimulation(Quantity<Time> timeStep) Steps the simulation forward in time.voidstepSimulation(Quantity<Time> timeStep, int maxSubSteps, Quantity<Time> fixedTimeStep) Steps the simulation with fixed time steps and max substeps.
-
Constructor Details
-
ODEWorld
public ODEWorld()
-
-
Method Details
-
addRigidBody
Description copied from interface:PhysicsWorldBridgeAdds a rigid body to the simulation.- Specified by:
addRigidBodyin interfacePhysicsWorldBridge- Parameters:
body- the body to add
-
removeRigidBody
Description copied from interface:PhysicsWorldBridgeRemoves a rigid body from the simulation.- Specified by:
removeRigidBodyin interfacePhysicsWorldBridge- Parameters:
body- the body to remove
-
stepSimulation
Description copied from interface:PhysicsWorldBridgeSteps the simulation forward in time.- Specified by:
stepSimulationin interfacePhysicsWorldBridge- Parameters:
timeStep- the amount of time to simulate
-
stepSimulation
Description copied from interface:PhysicsWorldBridgeSteps the simulation with fixed time steps and max substeps.- Specified by:
stepSimulationin interfacePhysicsWorldBridge- Parameters:
timeStep- the amount of time to simulatemaxSubSteps- maximum number of internal substepsfixedTimeStep- the internal fixed time step
-
setGravity
public void setGravity(double gravityX, double gravityY, double gravityZ) Description copied from interface:PhysicsWorldBridgeSets the gravity vector for the world.- Specified by:
setGravityin interfacePhysicsWorldBridge- Parameters:
gravityX- gravity in XgravityY- gravity in YgravityZ- gravity in Z
-
getOdeWorld
public org.ode4j.ode.DWorld getOdeWorld()
-