Class VehicleEngineSettings

java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.VehicleEngineSettings
All Implemented Interfaces:
ConstJoltPhysicsObject, AutoCloseable, Comparable<JoltPhysicsObject>
Direct Known Subclasses:
VehicleEngine

public class VehicleEngineSettings extends JoltPhysicsObject
Settings used to configure the engine of a WheeledVehicleController.
  • Method Details

    • getAngularDamping

      public float getAngularDamping()
      Return the angular damping factor. The settings are unaffected. (native attribute: mAngularDamping)
      Returns:
      the damping factor (per second)
    • getInertia

      public float getInertia()
      Return the engine's rotational inertia. The settings are unaffected. (native attribute: mInertia)
      Returns:
      the inertia (in kilogram.meter^2)
    • getMaxRpm

      public float getMaxRpm()
      Return the maximum rotation rate. The settings are unaffected. (native attribute: mMaxRPM)
      Returns:
      the limit (in revolutions per minute)
    • getMaxTorque

      public float getMaxTorque()
      Return the maximum torque. The settings are unaffected. (native attribute: mMaxTorque)
      Returns:
      the limit (in Newton.meters)
    • getMinRpm

      public float getMinRpm()
      Return the minimum rotation rate to avoid stalling. The settings are unaffected. (native attribute: mMinRPM)
      Returns:
      the limit (in revolutions per minute)
    • setAngularDamping

      public void setAngularDamping(float damping)
      Alter the angular damping factor. (native attribute: mAngularDamping)
      Parameters:
      damping - the desired damping factor (per second, default=0.2)
    • setInertia

      public void setInertia(float inertia)
      Alter the engine's rotational inertia. (native attribute: mInertia)
      Parameters:
      inertia - the desired inertia (in kg.meter^2, default=0.5)
    • setMaxRpm

      public void setMaxRpm(float rpm)
      Alter the maximum rotation rate. (native attribute: mMaxRPM)
      Parameters:
      rpm - the desired limit (in revolutions per minute, default=6000)
    • setMaxTorque

      public void setMaxTorque(float torque)
      Alter the maximum torque. (native attribute: mMaxTorque)
      Parameters:
      torque - the desired limit (in Newton.meters, default=500)
    • setMinRpm

      public void setMinRpm(float rpm)
      Alter the minimum rotation rate to avoid stalling. (native attribute: mMinRPM)
      Parameters:
      rpm - the desired limit (in revolutions per minute, default=1000)