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.ConeConstraint
- All Implemented Interfaces:
ConstConstraint
,ConstJoltPhysicsObject
,ConstTwoBodyConstraint
,RefTarget
,AutoCloseable
,Comparable<JoltPhysicsObject>
A
TwoBodyConstraint
that limits the swing of the twist axes to a cone
and disables translation.-
Method Summary
Modifier and TypeMethodDescriptionfloat
Return the cosine of half the cone angle.void
setHalfConeAngle
(float halfAngle) Alter the cone angle.Methods inherited from class com.github.stephengold.joltjni.TwoBodyConstraint
getBody1, getBody2, getConstraintToBody1Matrix, getConstraintToBody2Matrix, toRef
Methods inherited from class com.github.stephengold.joltjni.Constraint
getConstraintPriority, getConstraintSettings, getEnabled, getNumPositionStepsOverride, getNumVelocityStepsOverride, getRefCount, getSubType, getType, notifyShapeChanged, setConstraintPriority, setEmbedded, setEnabled, setNumPositionStepsOverride, setNumVelocityStepsOverride
Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
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
-
getCosHalfConeAngle
public float getCosHalfConeAngle()Return the cosine of half the cone angle. The constraint is unaffected.- Returns:
- the cosine ratio
-
setHalfConeAngle
public void setHalfConeAngle(float halfAngle) Alter the cone angle.- Parameters:
halfAngle
- the desired half angle (in radians)
-