Interface ConstWheel
- All Superinterfaces:
AutoCloseable,Comparable<JoltPhysicsObject>,ConstJoltPhysicsObject
Read-only access to
Wheel. (native type: const Wheel)-
Method Summary
Modifier and TypeMethodDescriptionfloatReturn the wheel's angular velocity.intReturn the ID of the body that's supporting the wheel.Copy the wheel's lateral (sideways) direction.Copy the wheel's longitudinal direction.Copy the contact normal direction.Copy the velocity of the contact point.Copy the location of the contact point.intReturn ID of the sub-shape that's supporting the vehicle.floatReturn the lateral (sideways) component of the impulse applied to the wheel.floatReturn the forward component of the impulse applied to the wheel.floatReturn the wheel's rotation angle.Access the settings used to create this wheel.floatReturn the steering angle.floatReturn the total impulse applied to the suspension.floatReturn the length of the suspension.booleanTest whether the wheel is supported.booleanTest whether the suspension has hit its hard point.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Method Details
-
getAngularVelocity
float getAngularVelocity()Return the wheel's angular velocity.- Returns:
- the angular velocity (in radians per second, positive when the vehicle is moving forward)
-
getContactBodyId
int getContactBodyId()Return the ID of the body that's supporting the wheel.- Returns:
- the body ID
-
getContactLateral
Vec3 getContactLateral()Copy the wheel's lateral (sideways) direction.- Returns:
- a new direction vector (in system coordinates)
-
getContactLongitudinal
Vec3 getContactLongitudinal()Copy the wheel's longitudinal direction.- Returns:
- a new direction vector (in system coordinates)
-
getContactNormal
Vec3 getContactNormal()Copy the contact normal direction.- Returns:
- a new direction vector (in system coordinates)
-
getContactPointVelocity
Vec3 getContactPointVelocity()Copy the velocity of the contact point.- Returns:
- a new velocity vector (meters per second in system coordinates)
-
getContactPosition
RVec3 getContactPosition()Copy the location of the contact point.- Returns:
- a new location vector (in system coordinates)
-
getContactSubShapeId
int getContactSubShapeId()Return ID of the sub-shape that's supporting the vehicle.- Returns:
- the sub-shape ID
-
getLateralLambda
float getLateralLambda()Return the lateral (sideways) component of the impulse applied to the wheel.- Returns:
- the impulse component (in Newton seconds)
-
getLongitudinalLambda
float getLongitudinalLambda()Return the forward component of the impulse applied to the wheel.- Returns:
- the impulse component (in Newton seconds)
-
getRotationAngle
float getRotationAngle()Return the wheel's rotation angle.- Returns:
- the angle (in radians)
-
getSettings
ConstWheelSettings getSettings()Access the settings used to create this wheel.- Returns:
- a new JVM object with the pre-existing native object assigned
-
getSteerAngle
float getSteerAngle()Return the steering angle.- Returns:
- the leftward angle (in radians, ≥-Pi, ≤Pi)
-
getSuspensionLambda
float getSuspensionLambda()Return the total impulse applied to the suspension.- Returns:
- the magnitude of the impulse (in Newton seconds)
-
getSuspensionLength
float getSuspensionLength()Return the length of the suspension.- Returns:
- the distance between the axle and the hard point (in meters)
-
hasContact
boolean hasContact()Test whether the wheel is supported.- Returns:
trueif supported, otherwisefalse
-
hasHitHardPoint
boolean hasHitHardPoint()Test whether the suspension has hit its hard point.- Returns:
trueif hit, otherwisefalse
-