Class VehicleTransmissionSettings

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

public class VehicleTransmissionSettings extends JoltPhysicsObject
Settings used to configure the transmission (gearbox) of a WheeledVehicleController.
  • Method Details

    • getClutchReleaseTime

      public float getClutchReleaseTime()
      Return how long it takes to release the clutch in Auto mode. The settings are unaffected. (native attribute: mClutchReleaseTime)
      Returns:
      the latency (in seconds)
    • getClutchStrength

      public float getClutchStrength()
      Return the total torque applied by the clutch when fully engaged. The settings are unaffected. (native attribute: mClutchStrength)
      Returns:
      the strength
    • getGearRatios

      public float[] getGearRatios()
      Return the number of engine rotations per gearbox rotation for each forward gear. The first element is for 1st gear. The settings are unaffected. (native attribute: mGearRatios)
      Returns:
      a new array
    • getMode

      public ETransmissionMode getMode()
      Return the type of transmission. The settings are unaffected. (native attribute: mMode)
      Returns:
      an enum value (not null)
    • getReverseGearRatios

      public float[] getReverseGearRatios()
      Return the number of engine rotations per gearbox rotation for each reverse gear. The settings are unaffected. (native attribute: mReverseGearRatios)
      Returns:
      a new array
    • getShiftDownRpm

      public float getShiftDownRpm()
      Return the maximum engine RPMs for downshifting in Auto mode. The settings are unaffected. (native attribute: mShiftDownRPM)
      Returns:
      the threshold rate (in revolutions per minute)
    • getShiftUpRpm

      public float getShiftUpRpm()
      Return the minimum engine RPMs for upshifting in Auto mode. The settings are unaffected. (native attribute: mShiftUpRPM)
      Returns:
      the threshold rate (in revolutions per minute)
    • getSwitchLatency

      public float getSwitchLatency()
      Return the minimum time between shifts in Auto mode. The settings are unaffected. (native attribute: mSwitchLatency)
      Returns:
      the latency (in seconds)
    • getSwitchTime

      public float getSwitchTime()
      Return how long it takes to shift gears in Auto mode. The settings are unaffected. (native attribute: mSwitchTime)
      Returns:
      the latency (in seconds)
    • setClutchReleaseTime

      public void setClutchReleaseTime(float latency)
      Alter how long it takes to release the clutch in Auto mode. (native attribute: mClutchReleaseTime)
      Parameters:
      latency - the desired latency (in seconds, default=0.3)
    • setClutchStrength

      public void setClutchStrength(float strength)
      Alter the total torque applied by the clutch when fully engaged. (native attribute: mClutchStrength)
      Parameters:
      strength - the desired strength (default=10)
    • setGearRatios

      public void setGearRatios(float... ratios)
      Alter the number of engine rotations per gearbox rotation for each forward gear. The first element is for 1st gear. (native attribute: mGearRatios)
      Parameters:
      ratios - the desired ratios (not null)
    • setMode

      public void setMode(ETransmissionMode mode)
      Alter the type of transmission. (native attribute: mMode)
      Parameters:
      mode - the desired mode (not null, default=Auto)
    • setReverseGearRatios

      public void setReverseGearRatios(float... ratios)
      Alter the number of engine rotations per gearbox rotation for each reverse gear. (native attribute: mReverseGearRatios)
      Parameters:
      ratios - the desired ratios (not null)
    • setShiftDownRpm

      public void setShiftDownRpm(float rpm)
      Alter the maximum engine RPMs for downshifting in Auto mode. (native attribute: mShiftDownRPM)
      Parameters:
      rpm - (default=2000)
    • setShiftUpRpm

      public void setShiftUpRpm(float rpm)
      Alter the minimum engine RPMs for upshifting in Auto mode. (native attribute: mShiftUpRPM)
      Parameters:
      rpm - (default=4000)
    • setSwitchLatency

      public void setSwitchLatency(float latency)
      Alter the minimum time between shifts in Auto mode. (native attribute: mSwitchLatency)
      Parameters:
      latency - the desired latency (in seconds)
    • setSwitchTime

      public void setSwitchTime(float latency)
      Alter how long it takes to shift gears in Auto mode. (native attribute: mSwitchTime)
      Parameters:
      latency - the desired latency (in seconds)