Package com.github.stephengold.joltjni
Class TwoBodyConstraint
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.Constraint
com.github.stephengold.joltjni.TwoBodyConstraint
- All Implemented Interfaces:
ConstConstraint,ConstJoltPhysicsObject,RefTarget,AutoCloseable,Comparable<ConstJoltPhysicsObject>
- Direct Known Subclasses:
ConeConstraint,DistanceConstraint,FixedConstraint,GearConstraint,HingeConstraint,PointConstraint,SixDofConstraint,SliderConstraint
A type of
Constraint that joins 2 bodies.-
Method Summary
Methods inherited from class com.github.stephengold.joltjni.Constraint
getConstraintPriority, getConstraintSettings, getEnabled, getNumPositionStepsOverride, getNumVelocityStepsOverride, getRefCount, getSubType, getType, getUserData, setConstraintPriority, setEmbedded, setEnabled, setNumPositionStepsOverride, setNumVelocityStepsOverride, setUserData, toRefMethods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, startCleaner, toString, vaMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, va
-
Method Details
-
getBody1
Access the first body in the constraint. The constraint is unaffected.- Returns:
- a new JVM object with the pre-existing native object assigned
-
getBody2
Access the 2nd body in the constraint. The constraint is unaffected.- Returns:
- a new JVM object with the pre-existing native object assigned
-
getConstraintToBody1Matrix
Calculate the coordinate transform from constraint space to body 1. The constraint is unaffected.- Returns:
- a new transform matrix
-
getConstraintToBody2Matrix
Calculate the coordinate transform from constraint space to body 2. The constraint is unaffected.- Returns:
- a new transform matrix
-