Package com.github.stephengold.joltjni
Class FixedConstraintSettings
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.SerializableObject
com.github.stephengold.joltjni.ConstraintSettings
com.github.stephengold.joltjni.TwoBodyConstraintSettings
com.github.stephengold.joltjni.FixedConstraintSettings
- All Implemented Interfaces:
ConstConstraintSettings,ConstJoltPhysicsObject,ConstSerializableObject,RefTarget,AutoCloseable,Comparable<JoltPhysicsObject>
Settings used to construct a
FixedConstraint.-
Constructor Summary
ConstructorsConstructorDescriptionInstantiate default settings.Instantiate a copy of the specified settings. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTest whether to configure the attachment points based on the positions of the bodies when the constraint is created.Copy 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.Copy the constraint location for body 1.Copy the constraint location for body 2.getSpace()Return which space the other properties are specified in.voidsetAutoDetectPoint(boolean setting) Alter whether to configure the attachment points based on the positions of the bodies when the constraint is created.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.Alter the constraint location for body 1.Alter the constraint location for body 2.voidsetSpace(EConstraintSpace space) Alter which space the other properties are specified in.Methods inherited from class com.github.stephengold.joltjni.TwoBodyConstraintSettings
create, toRefMethods inherited from class com.github.stephengold.joltjni.ConstraintSettings
getConstraintPriority, getControllerType, getDrawConstraintSize, getEnabled, getNumPositionStepsOverride, getNumVelocityStepsOverride, getRefCount, saveBinaryState, setConstraintPriority, setDrawConstraintSize, setEmbedded, setEnabled, setNumPositionStepsOverride, setNumVelocityStepsOverride, setVirtualAddressAsCoOwner, sRestoreFromBinaryStateMethods inherited from class com.github.stephengold.joltjni.SerializableObject
getRttiMethods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, 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, targetVaMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstSerializableObject
getRtti
-
Constructor Details
-
FixedConstraintSettings
public FixedConstraintSettings()Instantiate default settings. -
FixedConstraintSettings
Instantiate a copy of the specified settings.- Parameters:
original- the settings to copy (notnull, unaffected)
-
-
Method Details
-
getAutoDetectPoint
public boolean getAutoDetectPoint()Test whether to configure the attachment points based on the positions of the bodies when the constraint is created. The settings are unaffected. (native attribute: mAutoDetectPoint)- Returns:
trueto use body positions,falsefor explicit configuration
-
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
-
getPoint1
Copy the constraint location for body 1. The settings are unaffected. (native attribute: mPoint1)- Returns:
- a new location vector
-
getPoint2
Copy the constraint location for body 2. The settings are unaffected. (native attribute: mPoint2)- 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)
-
setAutoDetectPoint
public void setAutoDetectPoint(boolean setting) Alter whether to configure the attachment points based on the positions of the bodies when the constraint is created. (native attribute: mAutoDetectPoint)- Parameters:
setting-trueto use body positions,falsefor explicit configuration (default=false)
-
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))
-
setPoint1
Alter the constraint location for body 1. (native attribute: mPoint1)- Parameters:
location- the desired location (not null, unaffected, default=(0,0,0))- Returns:
- the argument, for chaining
-
setPoint2
Alter the constraint location for body 2. (native attribute: mPoint2)- Parameters:
location- the desired location (not null, unaffected, default=(0,0,0))- Returns:
- the argument, for chaining
-
setSpace
Alter which space the other properties are specified in. (native attribute: mSpace)- Parameters:
space- enum value (not null, default=WorldSpace)
-