Interface ConstMotorSettings
- All Superinterfaces:
AutoCloseable,Comparable<JoltPhysicsObject>,ConstJoltPhysicsObject
- All Known Implementing Classes:
MotorSettings
Read-only access to a
MotorSettings object. (native type: const
MotorSettings)-
Method Summary
Modifier and TypeMethodDescriptionAccess the underlyingConstraint, if any.Access the underlyingConstraintSettings, if any.floatReturn the maximum force to apply in a linear constraint.floatReturn the maximum torque to apply in an angular constraint.floatReturn the minimum force to apply in a linear constraint.floatReturn the minimum torque to apply in an angular constraint.Access the settings for the spring used to drive to the position target.booleanisValid()Test whether the settings are valid.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Method Details
-
getConstraint
ConstConstraint getConstraint()Access the underlyingConstraint, if any. The settings are unaffected.- Returns:
- the pre-existing instance, or
nullif none
-
getConstraintSettings
ConstConstraintSettings getConstraintSettings()Access the underlyingConstraintSettings, if any. The settings are unaffected.- Returns:
- the pre-existing instance, or
nullif none
-
getMaxForceLimit
float getMaxForceLimit()Return the maximum force to apply in a linear constraint. Ignored in an angular motor. The settings are unaffected.- Returns:
- the amount of force (in Newtons, typically positive)
-
getMaxTorqueLimit
float getMaxTorqueLimit()Return the maximum torque to apply in an angular constraint. Ignored in a linear motor. The settings are unaffected.- Returns:
- the amount of torque (in Newton.meters, typically positive)
-
getMinForceLimit
float getMinForceLimit()Return the minimum force to apply in a linear constraint. Ignored in an angular motor. The settings are unaffected.- Returns:
- the amount of force (in Newtons, typically negative)
-
getMinTorqueLimit
float getMinTorqueLimit()Return the minimum torque to apply in an angular constraint. Ignored in a linear motor. The settings are unaffected.- Returns:
- the amount of torque (in Newton.meters, typically negative)
-
getSpringSettings
ConstSpringSettings getSpringSettings()Access the settings for the spring used to drive to the position target. Ignored in a velocity motor. The motor settings are unaffected.- Returns:
- a new JVM object with the pre-existing native object assigned
-
isValid
boolean isValid()Test whether the settings are valid. They are unaffected.- Returns:
trueif valid, otherwisefalse
-