Package com.github.stephengold.joltjni
Class SixDofConstraintSettings
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.SerializableObject
com.github.stephengold.joltjni.ConstraintSettings
com.github.stephengold.joltjni.TwoBodyConstraintSettings
com.github.stephengold.joltjni.SixDofConstraintSettings
- All Implemented Interfaces:
ConstConstraintSettings,ConstJoltPhysicsObject,RefTarget,AutoCloseable,Comparable<ConstJoltPhysicsObject>
Settings used to construct a
SixDofConstraint. (native type:
SixDOFConstraintSettings)-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCopy the X axis for body 1.Copy the X axis for body 2.Copy the Y axis for body 1.Copy the Y axis for body 2.floatgetLimitMax(EAxis dof) Return the upper limit of the specified axis.floatgetLimitMin(EAxis dof) Return the lower limit of the specified axis.getLimitsSpringSettings(EAxis translationAxis) Access the spring settings for the specified axis.floatgetMaxFriction(EAxis dof) Return the maximum friction of the specified axis.getMotorSettings(EAxis dof) Access the motor settings for the specified axis.Copy the constraint location for body 1.Copy the constraint location for body 2.getSpace()Return which space the other properties are specified in.Return type of swing constraint.booleanisFixedAxis(EAxis dof) Test whether the specified axis is fixed.booleanisFreeAxis(EAxis dof) Test whether the specified axis is free.voidmakeFixedAxis(EAxis dof) Make the specified axis a fixed one.voidmakeFreeAxis(EAxis dof) Make the specified axis a free one.voidAlter the X axis for body 1.voidAlter the X axis for body 2.voidAlter the Y axis for body 1.voidAlter the Y axis for body 2.voidsetLimitedAxis(EAxis dof, float min, float max) Alter the limits of the specified axis.voidsetLimitMax(EAxis dof, float max) Alter the upper limit of the specified axis.voidsetLimitMin(EAxis dof, float min) Alter the lower limit of the specified axis.voidsetMaxFriction(EAxis dof, float friction) Alter the maximum friction of the specified axis.voidsetPosition1(RVec3Arg location) Alter the constraint location for body 1.voidsetPosition2(RVec3Arg location) Alter the constraint location for body 2.voidsetSpace(EConstraintSpace space) Alter which space the other properties are specified in.voidsetSwingType(ESwingType swingType) Alter the type of swing constraint.Methods inherited from class com.github.stephengold.joltjni.TwoBodyConstraintSettings
createMethods inherited from class com.github.stephengold.joltjni.ConstraintSettings
getConstraintPriority, getEnabled, getNumPositionStepsOverride, getNumVelocityStepsOverride, getRefCount, setConstraintPriority, setEmbedded, setEnabled, setNumPositionStepsOverride, setNumVelocityStepsOverride, 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
-
Constructor Details
-
SixDofConstraintSettings
public SixDofConstraintSettings()Instantiate default settings.
-
-
Method Details
-
getAxisX1
Copy the X axis for body 1. The settings are unaffected. (native attribute: mAxisX1)- Returns:
- a new direction vector
-
getAxisX2
Copy the X axis for body 2. The settings are unaffected. (native attribute: mAxisX2)- Returns:
- a new direction vector
-
getAxisY1
Copy the Y axis for body 1. The settings are unaffected. (native attribute: mAxisY1)- Returns:
- a new direction vector
-
getAxisY2
Copy the Y axis for body 2. The settings are unaffected. (native attribute: mAxisY2)- Returns:
- a new direction vector
-
getLimitMax
Return the upper limit of the specified axis. The settings are unaffected. (native attribute: mLimitMax)- Parameters:
dof- which axis (not null)- Returns:
- the upper limit
-
getLimitMin
Return the lower limit of the specified axis. The settings are unaffected. (native attribute: mLimitMin)- Parameters:
dof- which axis (not null)- Returns:
- the lower limit
-
getLimitsSpringSettings
Access the spring settings for the specified axis. The constraint settings are unaffected. (native attribute: mLimitsSpringSettings)- Parameters:
translationAxis- which axis (not null, not a rotation axis)- Returns:
- a new JVM object with the pre-existing native object assigned
-
getMaxFriction
Return the maximum friction of the specified axis. The settings are unaffected. (native attribute: mMaxFriction)- Parameters:
dof- which axis (not null)- Returns:
- the maximum friction value
-
getMotorSettings
Access the motor settings for the specified axis. The constraint settings are unaffected. (native attribute: mMotorSettings)- Parameters:
dof- which axis (not null)- Returns:
- a new JVM object with the pre-existing native object assigned
-
getPosition1
Copy the constraint location for body 1. The settings are unaffected. (native attribute: mPosition1)- Returns:
- a new location vector
-
getPosition2
Copy the constraint location for body 2. The settings are unaffected. (native attribute: mPosition2)- Returns:
- a new location vector
-
getSpace
Return which space the other properties are specified in. The settings are unaffected. (native attribute: mSpace)- Returns:
- an enum value (not null)
-
getSwingType
Return type of swing constraint. The settings are unaffected. (native attribute: mSwingType)- Returns:
- an enum value (not null)
-
isFixedAxis
Test whether the specified axis is fixed. The settings are unaffected.- Parameters:
dof- which axis to test (not null)- Returns:
- true if fixed, otherwise false
-
isFreeAxis
Test whether the specified axis is free. The settings are unaffected.- Parameters:
dof- which axis to test (not null)- Returns:
- true if free, otherwise false
-
makeFixedAxis
Make the specified axis a fixed one.- Parameters:
dof- which axis to modify (not null)
-
makeFreeAxis
Make the specified axis a free one.- Parameters:
dof- which axis to modify (not null)
-
setAxisX1
Alter the X axis for body 1. (native attribute: mAxisX1)- Parameters:
axis- the desired direction vector (default=(1,0,0))
-
setAxisX2
Alter the X axis for body 2. (native attribute: mAxisX2)- Parameters:
axis- the desired direction vector (default=(1,0,0))
-
setAxisY1
Alter the Y axis for body 1. (native attribute: mAxisY1)- Parameters:
axis- the desired direction vector (default=(0,1,0))
-
setAxisY2
Alter the Y axis for body 2. (native attribute: mAxisY2)- Parameters:
axis- the desired direction vector (default=(0,1,0))
-
setLimitedAxis
Alter the limits of the specified axis.- Parameters:
dof- which axis to modify (not null)min- the desired minimum valuemax- the desired maximum value
-
setLimitMax
Alter the upper limit of the specified axis. (native attribute: mLimitMax)- Parameters:
dof- which axis to modify (not null)max- the desired limit value (default=MAX_VALUE)
-
setLimitMin
Alter the lower limit of the specified axis. (native attribute: mLimitMin)- Parameters:
dof- which axis to modify (not null)min- the desired limit value (default=-MAX_VALUE)
-
setMaxFriction
Alter the maximum friction of the specified axis. (native attribute: mMaxFriction)- Parameters:
dof- which axis to modify (not null)friction- the desired value (default=0)
-
setPosition1
Alter the constraint location for body 1. (native attribute: mPosition1)- Parameters:
location- the desired location (not null, unaffected, default=(0,0,0))
-
setPosition2
Alter the constraint location for body 2. (native attribute: mPosition2)- Parameters:
location- the desired location (not null, unaffected, default=(0,0,0))
-
setSpace
Alter which space the other properties are specified in. (native attribute: mSpace)- Parameters:
space- an enum value (not null, default=WorldSpace)
-
setSwingType
Alter the type of swing constraint. (native attribute: mSwingType)- Parameters:
swingType- an enum value (not null, default=Cone)
-