Package com.github.stephengold.joltjni
Class SixDofConstraint
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.Constraint
com.github.stephengold.joltjni.TwoBodyConstraint
com.github.stephengold.joltjni.SixDofConstraint
- All Implemented Interfaces:
ConstConstraint,ConstJoltPhysicsObject,RefTarget,AutoCloseable,Comparable<ConstJoltPhysicsObject>
A
TwoBodyConstraint that can constrain all 6 degrees of freedom.
(native type: SixDOFConstraint)-
Method Summary
Modifier and TypeMethodDescriptionfloatgetLimitsMax(EAxis axis) Return the upper limit of the specified axis.floatgetLimitsMin(EAxis axis) Return the lower limit of the specified axis.getLimitsSpringSettings(EAxis axis) Access the spring settings of the specified axis.floatgetMaxFriction(EAxis axis) Return the maximum friction of the specified axis.getMotorSettings(EAxis axis) Access the motor settings of the specified axis.getMotorState(EAxis axis) Return the motor state of the specified axis.Copy the rotation of the constraint.Return the rotation upper limits.Return the rotation lower limits.Copy the target velocities of the angular motors.Copy the target orientation of the angular motors.Copy the target position of the linear motors.Copy the target velocities of the linear motors.Return the translation upper limits.Return the translation lower limits.booleanisFixedAxis(EAxis axis) Test whether the specified axis is fixed.booleanisFreeAxis(EAxis axis) Test whether the specified axis is free.voidsetLimitsSpringSettings(EAxis axis, SpringSettings springSettings) Alter the spring settings of the specified axis.voidsetMaxFriction(EAxis axis, float friction) Alter the maximum friction of the specified axis.voidsetMotorState(EAxis axis, EMotorState state) Alter the motor state of the specified axis.voidsetRotationLimits(Vec3Arg min, Vec3Arg max) Alter the rotation limits.voidAlter the target velocities of the angular motors.voidsetTargetOrientationBs(QuatArg orientation) Alter the target orientation of the angular motors in body space.voidsetTargetOrientationCs(QuatArg orientation) Alter the target orientation of the angular motors.voidsetTargetPositionCs(Vec3Arg offsets) Alter the target position of the linear motors.voidsetTargetVelocityCs(Vec3Arg velocity) Alter the target velocities of the linear motors.voidsetTranslationLimits(Vec3Arg min, Vec3Arg max) Alter the translation limits.Methods inherited from class com.github.stephengold.joltjni.TwoBodyConstraint
getBody1, getBody2, getConstraintToBody1Matrix, getConstraintToBody2MatrixMethods 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
-
getLimitsMax
Return the upper limit of the specified axis. The constraint is unaffected.- Parameters:
axis- which axis to query (not null)- Returns:
- the limit value
-
getLimitsMin
Return the lower limit of the specified axis. The constraint is unaffected.- Parameters:
axis- which axis to query (not null)- Returns:
- the limit value
-
getLimitsSpringSettings
Access the spring settings of the specified axis. The constraint is unaffected.- Parameters:
axis- which axis to query (not null)- Returns:
- a new JVM object with the pre-existing native object assigned
-
getMaxFriction
Return the maximum friction of the specified axis. The constraint is unaffected.- Parameters:
axis- which axis to alter (not null)- Returns:
- the friction value
-
getMotorSettings
Access the motor settings of the specified axis. The constraint is unaffected.- Parameters:
axis- which axis to query (not null)- Returns:
- a new JVM object with the pre-existing native object assigned
-
getMotorState
Return the motor state of the specified axis.- Parameters:
axis- which axis to alter (not null)- Returns:
- an enum value (not null)
-
getRotationInConstraintSpace
Copy the rotation of the constraint. The constraint is unaffected.- Returns:
- a new rotation quaternion
-
getRotationLimitsMax
Return the rotation upper limits. The constraint is unaffected.- Returns:
- the upper limit for each axis (not null)
-
getRotationLimitsMin
Return the rotation lower limits. The constraint is unaffected.- Returns:
- the lower limit for each axis (not null)
-
getTargetAngularVelocityCs
Copy the target velocities of the angular motors. The constraint is unaffected.- Returns:
- a new angular velocity vector (radians per second in body 2 constraint space)
-
getTargetPositionCs
Copy the target position of the linear motors.- Returns:
- a new offset vector (meters in body 1 constraint space)
-
getTargetOrientationCs
Copy the target orientation of the angular motors.- Returns:
- the target orientation (in constraint space)
-
getTargetVelocityCs
Copy the target velocities of the linear motors. The constraint is unaffected.- Returns:
- a new linear velocity vector (meters per second in body 1 constraint space)
-
getTranslationLimitsMax
Return the translation upper limits. The constraint is unaffected.- Returns:
- the upper limit for each axis (not null)
-
getTranslationLimitsMin
Return the translation lower limits. The constraint is unaffected.- Returns:
- the lower limit for each axis (not null)
-
isFixedAxis
Test whether the specified axis is fixed. The constraint is unaffected.- Parameters:
axis- which axis to query (not null)- Returns:
- true if fixed, otherwise false
-
isFreeAxis
Test whether the specified axis is free. The constraint is unaffected.- Parameters:
axis- which axis to query (not null)- Returns:
- true if free, otherwise false
-
setLimitsSpringSettings
Alter the spring settings of the specified axis.- Parameters:
axis- which axis to alter (not null)springSettings- the desired settings (not null, unaffected)
-
setMaxFriction
Alter the maximum friction of the specified axis.- Parameters:
axis- which axis to alter (not null)friction- the desired value
-
setMotorState
Alter the motor state of the specified axis.- Parameters:
axis- which axis to alter (not null)state- the desired state (not null)
-
setRotationLimits
Alter the rotation limits.- Parameters:
min- the lower limit for each axis (not null, unaffected)max- the upper limit for each axis (not null, unaffected)
-
setTargetVelocityCs
Alter the target velocities of the linear motors.- Parameters:
velocity- the desired linear velocity (meters per second in body 1 constraint space, not null)
-
setTargetAngularVelocityCs
Alter the target velocities of the angular motors.- Parameters:
omega- the desired angular velocity (radians per second in body 2 constraint space, not null)
-
setTargetPositionCs
Alter the target position of the linear motors.- Parameters:
offsets- the desired offsets (meters in body 1 constraint space)
-
setTargetOrientationBs
Alter the target orientation of the angular motors in body space.- Parameters:
orientation- the desired target orientation (not null, unaffected)
-
setTargetOrientationCs
Alter the target orientation of the angular motors.- Parameters:
orientation- the desired orientation (in body 1 constraint space)
-
setTranslationLimits
Alter the translation limits.- Parameters:
min- the lower limit for each axis (not null, unaffected)max- the upper limit for each axis (not null, unaffected)
-