Package com.github.stephengold.joltjni
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
Settings used to configure the transmission (gearbox) of a
WheeledVehicleController
.-
Method Summary
Modifier and TypeMethodDescriptionfloat
Return how long it takes to release the clutch inAuto
mode.float
Return the total torque applied by the clutch when fully engaged.float[]
Return the number of engine rotations per gearbox rotation for each forward gear.getMode()
Return the type of transmission.float[]
Return the number of engine rotations per gearbox rotation for each reverse gear.float
Return the maximum engine RPMs for downshifting inAuto
mode.float
Return the minimum engine RPMs for upshifting inAuto
mode.float
Return the minimum time between shifts inAuto
mode.float
Return how long it takes to shift gears inAuto
mode.void
setClutchReleaseTime
(float latency) Alter how long it takes to release the clutch inAuto
mode.void
setClutchStrength
(float strength) Alter the total torque applied by the clutch when fully engaged.void
setGearRatios
(float... ratios) Alter the number of engine rotations per gearbox rotation for each forward gear.void
setMode
(ETransmissionMode mode) Alter the type of transmission.void
setReverseGearRatios
(float... ratios) Alter the number of engine rotations per gearbox rotation for each reverse gear.void
setShiftDownRpm
(float rpm) Alter the maximum engine RPMs for downshifting inAuto
mode.void
setShiftUpRpm
(float rpm) Alter the minimum engine RPMs for upshifting inAuto
mode.void
setSwitchLatency
(float latency) Alter the minimum time between shifts inAuto
mode.void
setSwitchTime
(float latency) Alter how long it takes to shift gears inAuto
mode.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
Method Details
-
getClutchReleaseTime
public float getClutchReleaseTime()Return how long it takes to release the clutch inAuto
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
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 inAuto
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 inAuto
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 inAuto
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 inAuto
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 inAuto
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
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 inAuto
mode. (native attribute: mShiftDownRPM)- Parameters:
rpm
- (default=2000)
-
setShiftUpRpm
public void setShiftUpRpm(float rpm) Alter the minimum engine RPMs for upshifting inAuto
mode. (native attribute: mShiftUpRPM)- Parameters:
rpm
- (default=4000)
-
setSwitchLatency
public void setSwitchLatency(float latency) Alter the minimum time between shifts inAuto
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 inAuto
mode. (native attribute: mSwitchTime)- Parameters:
latency
- the desired latency (in seconds)
-