Package com.github.stephengold.joltjni
Class WheelSettingsTvRef
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.template.Ref
com.github.stephengold.joltjni.WheelSettingsTvRef
- All Implemented Interfaces:
- ConstJoltPhysicsObject,- ConstSerializableObject,- ConstWheelSettings,- ConstWheelSettingsTv,- AutoCloseable,- Comparable<JoltPhysicsObject>
A counted reference to a 
WheelSettingsTv object. (native type:
 Ref<WheelSettingsTV>)- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanDetermine where to apply tire forces.floatReturn the tire's friction in the sideways direction.floatReturn the tire's friction in the forward direction.Copy the location of the attachment point.getPtr()Temporarily access the referencedWheelSettingsTv.floatReturn the radius of the wheel.getRtti()Access the type information of the target.Copy the steering axis (upward direction).Copy the downward direction of the suspension.Copy the location where tire forces will be applied if the force-point option is enabled.floatReturn the maximum displacement from the attachment point.floatReturn the minimum displacement from the attachment point.floatReturn the suspension preload length.Access the settings for the suspension spring.Copy the forward direction when steering is neutral.Copy the "up" direction when steering is neutral.floatgetWidth()Return the width of the wheel.voidsaveBinaryState(StreamOut stream) Save the settings to the specified binary stream.setEnableSuspensionForcePoint(boolean enable) Alter where to apply tire forces.setLateralFriction(float friction) Alter the wheel's friction in the sideways direction.setLongitudinalFriction(float friction) Alter the wheel's friction in the forward direction.setPosition(Vec3Arg position) Relocate the attachment point.setRadius(float radius) Alter the radius of the wheel.setSteeringAxis(Vec3Arg direction) Alter the steering axis (upward direction).setSuspensionDirection(Vec3Arg direction) Alter the downward direction of the suspension.setSuspensionForcePoint(Vec3Arg location) Alter the location where tire forces will be applied if the force-point option is enabled.setSuspensionMaxLength(float length) Alter the maximum displacement from the attachment point.setSuspensionMinLength(float length) Alter the minimum displacement from the attachment point.setSuspensionPreloadLength(float length) Alter the suspension preload length.setWheelForward(Vec3Arg direction) Alter the forward direction when steering is neutral.setWheelUp(Vec3Arg direction) Alter the "up" direction when steering is neutral.setWidth(float width) Alter the width of the wheel.longtargetVa()Return the address of the nativeWheelSettingsTV.toRef()Create another counted reference to the nativeWheelSettingsTV.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObjectclose, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, toString, vaMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.ComparablecompareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObjectclose, hasAssignedNativeObject, ownsNativeObject
- 
Constructor Details- 
WheelSettingsTvRefpublic WheelSettingsTvRef()Instantiate an empty reference.
 
- 
- 
Method Details- 
setEnableSuspensionForcePointAlter where to apply tire forces. (native attribute: mEnableSuspensionForcePoint)- Parameters:
- enable-- trueto apply at the configured suspension-force point,- falseto apply at the wheel's point of contact (default=false)
- Returns:
- the current reference, for chaining
 
- 
setLateralFrictionAlter the wheel's friction in the sideways direction. (native attribute: mLateralFriction)- Parameters:
- friction- the desired friction (default=2)
- Returns:
- the current reference, for chaining
 
- 
setLongitudinalFrictionAlter the wheel's friction in the forward direction. (native attribute: mLongitudinalFriction)- Parameters:
- friction- the desired friction (default=4)
- Returns:
- the current reference, for chaining
 
- 
setPositionRelocate the attachment point. (native attribute: mPosition)- Parameters:
- position- the location of the attachment point (in the body's local coordinates, not null, unaffected, default=(0,0,0))
- Returns:
- the current reference, for chaining
 
- 
setRadiusAlter the radius of the wheel. (native attribute: mRadius)- Parameters:
- radius- the desired radius (in meters, default=0.3)
- Returns:
- the current reference, for chaining
 
- 
setSteeringAxisAlter the steering axis (upward direction). (native attribute: mSteeringAxis)- Parameters:
- direction- the desired direction (not null, unaffected, default=(0,1,0))
- Returns:
- the current reference, for chaining
 
- 
setSuspensionDirectionAlter the downward direction of the suspension. (native attribute: mSuspensionDirection)- Parameters:
- direction- the desired direction (not null, unaffected, default=(0,-1,0))
- Returns:
- the current reference, for chaining
 
- 
setSuspensionForcePointAlter the location where tire forces will be applied if the force-point option is enabled. (native attribute: mSuspensionForcePoint)- Parameters:
- location- the desired location (in the body coordinates, not null, unaffected, default=(0,0,0))
- Returns:
- the current reference, for chaining
 
- 
setSuspensionMaxLengthAlter the maximum displacement from the attachment point. (native attribute: mSuspensionMaxLength)- Parameters:
- length- the desired limit (in meters, default=0.5)
- Returns:
- the current reference, for chaining
 
- 
setSuspensionMinLengthAlter the minimum displacement from the attachment point. (native attribute: mSuspensionMinLength)- Parameters:
- length- the desired limit (in meters, default=0.3)
- Returns:
- the current reference, for chaining
 
- 
setSuspensionPreloadLengthAlter the suspension preload length. (native attribute: mSuspensionPreloadLength)- Parameters:
- length- the desired offset (in meters, default=0)
- Returns:
- the current reference, for chaining
 
- 
setWheelForwardAlter the forward direction when steering is neutral. (native attribute: mWheelForward)- Parameters:
- direction- the desired direction (not null, unaffected, default=(0,0,1))
- Returns:
- the current reference, for chaining
 
- 
setWheelUpAlter the "up" direction when steering is neutral. (native attribute: mWheelUp)- Parameters:
- direction- the desired direction (not null, unaffected, default=(0,1,0))
- Returns:
- the current reference, for chaining
 
- 
setWidthAlter the width of the wheel. (native attribute: mWidth)- Parameters:
- width- the desired width (in meters, default=0.1)
- Returns:
- the current reference, for chaining
 
- 
getEnableSuspensionForcePointpublic boolean getEnableSuspensionForcePoint()Determine where to apply tire forces. The settings are unaffected. (native attribute: mEnableSuspensionForcePoint)- Specified by:
- getEnableSuspensionForcePointin interface- ConstWheelSettings
- Returns:
- trueif applied at the configured suspension-force point,- falseif applied at the wheel's point of contact
 
- 
getLateralFrictionpublic float getLateralFriction()Return the tire's friction in the sideways direction. The settings are unaffected. (native attribute: mLateralFriction)- Specified by:
- getLateralFrictionin interface- ConstWheelSettingsTv
- Returns:
- the friction
 
- 
getLongitudinalFrictionpublic float getLongitudinalFriction()Return the tire's friction in the forward direction. The settings are unaffected. (native attribute: mLongitudinalFriction)- Specified by:
- getLongitudinalFrictionin interface- ConstWheelSettingsTv
- Returns:
- the friction
 
- 
getPositionCopy the location of the attachment point. The settings are unaffected. (native attribute: mPosition)- Specified by:
- getPositionin interface- ConstWheelSettings
- Returns:
- a new location vector (in the body's local coordinates)
 
- 
getRadiuspublic float getRadius()Return the radius of the wheel. The settings are unaffected. (native attribute: mRadius)- Specified by:
- getRadiusin interface- ConstWheelSettings
- Returns:
- the radius (in meters)
 
- 
getRttiAccess the type information of the target. (native function: GetRTTI)- Specified by:
- getRttiin interface- ConstSerializableObject
- Returns:
- a new JVM object with the pre-existing native object assigned
 
- 
getSteeringAxisCopy the steering axis (upward direction). The settings are unaffected. (native attribute: mSteeringAxis)- Specified by:
- getSteeringAxisin interface- ConstWheelSettings
- Returns:
- a new direction vector
 
- 
getSuspensionDirectionCopy the downward direction of the suspension. The settings are unaffected. (native attribute: mSuspensionDirection)- Specified by:
- getSuspensionDirectionin interface- ConstWheelSettings
- Returns:
- a new direction vector
 
- 
getSuspensionForcePointCopy the location where tire forces will be applied if the force-point option is enabled. The settings are unaffected. (native attribute: mSuspensionForcePoint)- Specified by:
- getSuspensionForcePointin interface- ConstWheelSettings
- Returns:
- a new location vector (in body coordinates)
 
- 
getSuspensionMaxLengthpublic float getSuspensionMaxLength()Return the maximum displacement from the attachment point. The settings are unaffected. (native attribute: mSuspensionMaxLength)- Specified by:
- getSuspensionMaxLengthin interface- ConstWheelSettings
- Returns:
- the distance (in meters)
 
- 
getSuspensionMinLengthpublic float getSuspensionMinLength()Return the minimum displacement from the attachment point. The settings are unaffected. (native attribute: mSuspensionMinLength)- Specified by:
- getSuspensionMinLengthin interface- ConstWheelSettings
- Returns:
- the distance (in meters)
 
- 
getSuspensionPreloadLengthpublic float getSuspensionPreloadLength()Return the suspension preload length. The settings are unaffected. (native attribute: mSuspensionPreloadLength)- Specified by:
- getSuspensionPreloadLengthin interface- ConstWheelSettings
- Returns:
- the offset (in meters)
 
- 
getSuspensionSpringAccess the settings for the suspension spring. (native attribute: mSuspensionSpring)- Specified by:
- getSuspensionSpringin interface- ConstWheelSettings
- Returns:
- a new JVM object with the pre-existing native object assigned
 
- 
getWheelForwardCopy the forward direction when steering is neutral. The settings are unaffected. (native attribute: mWheelForward)- Specified by:
- getWheelForwardin interface- ConstWheelSettings
- Returns:
- a new direction vector
 
- 
getWheelUpCopy the "up" direction when steering is neutral. The settings are unaffected. (native attribute: mWheelUp)- Specified by:
- getWheelUpin interface- ConstWheelSettings
- Returns:
- a new direction vector
 
- 
getWidthpublic float getWidth()Return the width of the wheel. The settings are unaffected. (native attribute: mWidth)- Specified by:
- getWidthin interface- ConstWheelSettings
- Returns:
- the width (in meters)
 
- 
saveBinaryStateSave the settings to the specified binary stream. The settings are unaffected.- Specified by:
- saveBinaryStatein interface- ConstWheelSettings
- Parameters:
- stream- the stream to write to (not null)
 
- 
getPtrTemporarily access the referencedWheelSettingsTv.
- 
targetVapublic long targetVa()Return the address of the nativeWheelSettingsTV. No objects are affected.- Specified by:
- targetVain interface- ConstJoltPhysicsObject
- Overrides:
- targetVain class- JoltPhysicsObject
- Returns:
- a virtual address (not zero)
 
- 
toRefCreate another counted reference to the nativeWheelSettingsTV.
 
-