Interface ConstConstraint
- All Superinterfaces:
Comparable<JoltPhysicsObject>
,ConstJoltPhysicsObject
- All Known Subinterfaces:
ConstTwoBodyConstraint
,ConstVehicleConstraint
- All Known Implementing Classes:
ConeConstraint
,Constraint
,ConstraintRef
,DistanceConstraint
,FixedConstraint
,GearConstraint
,HingeConstraint
,PathConstraint
,PointConstraint
,PulleyConstraint
,RackAndPinionConstraint
,SixDofConstraint
,SliderConstraint
,SwingTwistConstraint
,TwoBodyConstraint
,TwoBodyConstraintRef
,VehicleConstraint
,VehicleConstraintRef
Read-only access to a
Constraint
. (native type: const Constraint)-
Method Summary
Modifier and TypeMethodDescriptionint
Return the constraint's priority when solving.Generate settings to reconstruct the constraint.boolean
Test whether the constraint is enabled.int
Return the override for the number of position iterations used in the solver.int
Return the override for the number of velocity iterations used in the solver.Return the constraint's subtype.getType()
Return the constraint's type.boolean
isActive()
Test whether the constraint is active.void
saveState
(StateRecorder recorder) Save the state of the constraint, for possible replay.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Method Details
-
getConstraintPriority
int getConstraintPriority()Return the constraint's priority when solving. The constraint is unaffected.- Returns:
- the priority level
-
getConstraintSettings
ConstraintSettingsRef getConstraintSettings()Generate settings to reconstruct the constraint. The constraint is unaffected.- Returns:
- a new counted reference to a new settings object
-
getEnabled
boolean getEnabled()Test whether the constraint is enabled. The constraint is unaffected.- Returns:
true
if enabled, otherwisefalse
-
getNumPositionStepsOverride
int getNumPositionStepsOverride()Return the override for the number of position iterations used in the solver. The constraint is unaffected.- Returns:
- the number of iterations, or 0 to use the default in
PhysicsSettings
-
getNumVelocityStepsOverride
int getNumVelocityStepsOverride()Return the override for the number of velocity iterations used in the solver. The constraint is unaffected.- Returns:
- the number of iterations, or 0 to use the default in
PhysicsSettings
-
getSubType
EConstraintSubType getSubType()Return the constraint's subtype. The constraint is unaffected.- Returns:
- an enum value (not null)
-
getType
EConstraintType getType()Return the constraint's type. The constraint is unaffected.- Returns:
- an enum value (not null)
-
isActive
boolean isActive()Test whether the constraint is active. The constraint is unaffected.- Returns:
true
if active, otherwisefalse
-
saveState
Save the state of the constraint, for possible replay. The constraint is unaffected.- Parameters:
recorder
- the recorder to write to (not null)
-