Package com.github.stephengold.joltjni
Class WheeledVehicleControllerSettings
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.SerializableObject
com.github.stephengold.joltjni.VehicleControllerSettings
com.github.stephengold.joltjni.WheeledVehicleControllerSettings
- All Implemented Interfaces:
ConstJoltPhysicsObject,ConstSerializableObject,ConstVehicleControllerSettings,ConstWheeledVehicleControllerSettings,RefTarget,AutoCloseable,Comparable<JoltPhysicsObject>
- Direct Known Subclasses:
MotorcycleControllerSettings
public class WheeledVehicleControllerSettings
extends VehicleControllerSettings
implements ConstWheeledVehicleControllerSettings
Settings used to construct a
WheeledVehicleController.-
Constructor Summary
ConstructorsConstructorDescriptionInstantiate default settings.Instantiate a copy of the specified settings. -
Method Summary
Modifier and TypeMethodDescriptiongetDifferential(int index) Access the settings for the specified differential.floatReturn the ratio of the max/min average wheel speed for each differential.Access the engine settings.intCount how many differentials the vehicle will have.Access the transmission (gearbox) settings.voidCopy the argument to the current settings.voidsetDifferentialLimitedSlipRatio(float ratio) Alter the ratio of the max/min average wheel speed for each differential.voidsetNumDifferentials(int count) Alter the number of differentials.Methods inherited from class com.github.stephengold.joltjni.VehicleControllerSettings
getRefCount, restoreBinaryState, saveBinaryState, setEmbedded, setVirtualAddressAsCoOwner, toRefMethods inherited from class com.github.stephengold.joltjni.SerializableObject
getRttiMethods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, vaMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVaMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstSerializableObject
getRttiMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstVehicleControllerSettings
saveBinaryState
-
Constructor Details
-
WheeledVehicleControllerSettings
public WheeledVehicleControllerSettings()Instantiate default settings. -
WheeledVehicleControllerSettings
Instantiate a copy of the specified settings.- Parameters:
original- the settings to copy (notnull, unaffected)
-
-
Method Details
-
set
Copy the argument to the current settings.- Parameters:
source- the settings to copy (notnull, unaffected)
-
setDifferentialLimitedSlipRatio
public void setDifferentialLimitedSlipRatio(float ratio) Alter the ratio of the max/min average wheel speed for each differential. (native field: mDifferentialLimitedSlipRatio)- Parameters:
ratio- the desired ratio (>1, default=1.4)
-
setNumDifferentials
public void setNumDifferentials(int count) Alter the number of differentials. (native attribute: mDifferentials)- Parameters:
count- the desired number (≥0, default=0)
-
getDifferential
Access the settings for the specified differential. (native field: mDifferentials)- Specified by:
getDifferentialin interfaceConstWheeledVehicleControllerSettings- Parameters:
index- the index of the differential to access (≥0)- Returns:
- a new JVM object with the pre-existing native object assigned
-
getDifferentialLimitedSlipRatio
public float getDifferentialLimitedSlipRatio()Return the ratio of the max/min average wheel speed for each differential. The settings are unaffected. (native field: mDifferentialLimitedSlipRatio)- Specified by:
getDifferentialLimitedSlipRatioin interfaceConstWheeledVehicleControllerSettings- Returns:
- the ratio
-
getEngine
Access the engine settings. (native field: mEngine)- Specified by:
getEnginein interfaceConstWheeledVehicleControllerSettings- Returns:
- a new JVM object with the pre-existing native object assigned
-
getNumDifferentials
public int getNumDifferentials()Count how many differentials the vehicle will have. The settings are unaffected. (native attribute: mDifferentials)- Specified by:
getNumDifferentialsin interfaceConstWheeledVehicleControllerSettings- Returns:
- the count (≥0)
-
getTransmission
Access the transmission (gearbox) settings. (native attribute: mTransmission)- Specified by:
getTransmissionin interfaceConstWheeledVehicleControllerSettings- Returns:
- a new JVM object with the pre-existing native object assigned
-