Class JBulletWorld

java.lang.Object
org.episteme.nativ.physics.classical.mechanics.collision.backends.jbullet.JBulletWorld
All Implemented Interfaces:
PhysicsWorldBridge

public class JBulletWorld extends Object implements PhysicsWorldBridge
JBullet implementation of PhysicsWorldBackend.
  • Constructor Details

    • JBulletWorld

      public JBulletWorld()
  • Method Details

    • addRigidBody

      public void addRigidBody(RigidBody body)
      Description copied from interface: PhysicsWorldBridge
      Adds a rigid body to the simulation.
      Specified by:
      addRigidBody in interface PhysicsWorldBridge
      Parameters:
      body - the body to add
    • removeRigidBody

      public void removeRigidBody(RigidBody body)
      Description copied from interface: PhysicsWorldBridge
      Removes a rigid body from the simulation.
      Specified by:
      removeRigidBody in interface PhysicsWorldBridge
      Parameters:
      body - the body to remove
    • stepSimulation

      public void stepSimulation(Quantity<Time> timeStep)
      Description copied from interface: PhysicsWorldBridge
      Steps the simulation forward in time.
      Specified by:
      stepSimulation in interface PhysicsWorldBridge
      Parameters:
      timeStep - the amount of time to simulate
    • stepSimulation

      public void stepSimulation(Quantity<Time> timeStep, int maxSubSteps, Quantity<Time> fixedTimeStep)
      Description copied from interface: PhysicsWorldBridge
      Steps the simulation with fixed time steps and max substeps.
      Specified by:
      stepSimulation in interface PhysicsWorldBridge
      Parameters:
      timeStep - the amount of time to simulate
      maxSubSteps - maximum number of internal substeps
      fixedTimeStep - the internal fixed time step
    • setGravity

      public void setGravity(double gravityX, double gravityY, double gravityZ)
      Description copied from interface: PhysicsWorldBridge
      Sets the gravity vector for the world.
      Specified by:
      setGravity in interface PhysicsWorldBridge
      Parameters:
      gravityX - gravity in X
      gravityY - gravity in Y
      gravityZ - gravity in Z
    • getDynamicsWorld

      public com.bulletphysics.dynamics.DiscreteDynamicsWorld getDynamicsWorld()