Package com.github.stephengold.joltjni
Class VehicleConstraintSettings
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.SerializableObject
com.github.stephengold.joltjni.ConstraintSettings
com.github.stephengold.joltjni.VehicleConstraintSettings
- All Implemented Interfaces:
ConstConstraintSettings,ConstJoltPhysicsObject,RefTarget,AutoCloseable,Comparable<ConstJoltPhysicsObject>
Settings used to construct a
VehicleConstraint.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddWheels(WheelSettings... wheelSettingsArray) Append the specified wheel settings.Access the controller settings.Copy the "forward" vector.floatReturn the vehicle's maximum pitch/roll angle.getUp()Copy the "up" vector.Enumerate the wheel settings.voidsetController(VehicleControllerSettings controllerSettings) Alter the how the vehicle accelerates and decelerates.voidsetForward(Vec3Arg forward) Alter the forward direction.voidsetMaxPitchRollAngle(float angle) Alter the vehicle's maximum pitch/roll angle.voidAlter the up direction.Methods inherited from class com.github.stephengold.joltjni.ConstraintSettings
getConstraintPriority, getEnabled, getNumPositionStepsOverride, getNumVelocityStepsOverride, getRefCount, setConstraintPriority, setEmbedded, setEnabled, setNumPositionStepsOverride, setNumVelocityStepsOverride, toRefMethods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, startCleaner, 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, va
-
Constructor Details
-
VehicleConstraintSettings
public VehicleConstraintSettings()Instantiate default settings.
-
-
Method Details
-
addWheels
Append the specified wheel settings. (native attribute: mWheels)- Parameters:
wheelSettingsArray- the wheel settings to append
-
getController
Access the controller settings.- Returns:
- a new JVM object that refers to the pre-existing native object
-
getForward
Copy the "forward" vector. The settings are unaffected. (native attribute: mForward)- Returns:
- a new direction vector
-
getMaxPitchRollAngle
public float getMaxPitchRollAngle()Return the vehicle's maximum pitch/roll angle. The settings are unaffected. (native attribute: mMaxPitchRollAngle)- Returns:
- the angle (in radians)
-
getWheels
Enumerate the wheel settings. The settings are unaffected. (native attribute: mWheels)- Returns:
- a new array of pre-existing objects
-
getUp
Copy the "up" vector. The settings are unaffected. (native attribute: mUp)- Returns:
- a new direction vector
-
setController
Alter the how the vehicle accelerates and decelerates. (native attribute: mController)- Parameters:
controllerSettings- the desired settings (not null)
-
setForward
Alter the forward direction. (native attribute: mForward)- Parameters:
forward- the desired forward direction (not null, unaffected, default=(0,0,1))
-
setMaxPitchRollAngle
public void setMaxPitchRollAngle(float angle) Alter the vehicle's maximum pitch/roll angle. (native attribute: mMaxPitchRollAngle)- Parameters:
angle- the desired limit (in radians, default=Pi)
-
setUp
Alter the up direction. (native attribute: mUp)- Parameters:
up- the desired up direction (not null, unaffected, default=(0,1,0))
-