Interface ConstTwoBodyConstraint
- All Superinterfaces:
Comparable<JoltPhysicsObject>
,ConstConstraint
,ConstJoltPhysicsObject
- All Known Implementing Classes:
ConeConstraint
,DistanceConstraint
,FixedConstraint
,GearConstraint
,HingeConstraint
,PathConstraint
,PointConstraint
,PulleyConstraint
,RackAndPinionConstraint
,SixDofConstraint
,SliderConstraint
,SwingTwistConstraint
,TwoBodyConstraint
,TwoBodyConstraintRef
Read-only access to a
TwoBodyConstraint
. (native type: const
TwoBodyConstraint)-
Method Summary
Modifier and TypeMethodDescriptiongetBody1()
Access the first body in the constraint.void
getBody1PivotLocation
(DoubleBuffer storeResult) Copy the first body's pivot location.getBody2()
Access the 2nd body in the constraint.void
getBody2PivotLocation
(DoubleBuffer storeResult) Copy the 2nd body's pivot location.Calculate the coordinate transform from constraint space to body 1.Calculate the coordinate transform from constraint space to body 2.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstConstraint
getConstraintPriority, getConstraintSettings, getEnabled, getNumPositionStepsOverride, getNumVelocityStepsOverride, getSubType, getType
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Method Details
-
getBody1
Body getBody1()Access the first body in the constraint. The constraint is unaffected.- Returns:
- a new JVM object with the pre-existing native object assigned
-
getBody1PivotLocation
Copy the first body's pivot location. The constraint is unaffected.- Parameters:
storeResult
- storage for the location in system coordinates (not null, modified)
-
getBody2
Body getBody2()Access the 2nd body in the constraint. The constraint is unaffected.- Returns:
- a new JVM object with the pre-existing native object assigned
-
getBody2PivotLocation
Copy the 2nd body's pivot location. The constraint is unaffected.- Parameters:
storeResult
- storage for the location in system coordinates (not null, modified)
-
getConstraintToBody1Matrix
Mat44 getConstraintToBody1Matrix()Calculate the coordinate transform from constraint space to body 1. The constraint is unaffected.- Returns:
- a new transform matrix
-
getConstraintToBody2Matrix
Mat44 getConstraintToBody2Matrix()Calculate the coordinate transform from constraint space to body 2. The constraint is unaffected.- Returns:
- a new transform matrix
-