Class NativeODEWorld

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

public class NativeODEWorld extends Object implements PhysicsWorldBridge
Native-backed implementation of PhysicsWorldBridge for the ODE (Open Dynamics Engine).

Uses Project Panama (FFM API) to call into the native ode library. Falls back to no-ops gracefully if the library is not found on this system.

Since:
1.1
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • NativeODEWorld

      public NativeODEWorld()
  • 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