Package com.github.stephengold.joltjni
Class PathConstraintSettings
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.PathConstraintSettings
- All Implemented Interfaces:
ConstConstraintSettings,ConstJoltPhysicsObject,ConstSerializableObject,RefTarget,AutoCloseable,Comparable<JoltPhysicsObject>
Settings used to construct a
PathConstraint.-
Constructor Summary
ConstructorsConstructorDescriptionInstantiate default settings.PathConstraintSettings(PathConstraintSettings original) Instantiate a copy of the specified settings. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturn the maximum friction force when not driven by a motor.getPath()Access the path.floatReturn how far the body is along the path initially.Copy the starting location.Copy the initial rotation.Access the settings of the position motor.The settings are unaffected.voidsetMaxFrictionForce(float force) Alter the maximum friction force when not driven by a motor.voidReplace the current path with the specified one.voidsetPathFraction(float amount) Alter how far the body is along the path initially.voidsetPathPosition(Vec3Arg location) Alter the initial location.voidsetPathRotation(QuatArg orientation) Alter the initial orientation.voidsetPositionMotorSettings(MotorSettings motorSettings) Alter the motor settings.voidAlter the (native field: mRotationConstraintType)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
-
PathConstraintSettings
public PathConstraintSettings()Instantiate default settings. -
PathConstraintSettings
Instantiate a copy of the specified settings.- Parameters:
original- the settings to copy (notnull, unaffected)
-
-
Method Details
-
getMaxFrictionForce
public float getMaxFrictionForce()Return the maximum friction force when not driven by a motor. The settings are unaffected. (native field: mMaxFrictionForce)- Returns:
- the force (in Newtons)
-
getPath
Access the path. (native field: mPath)- Returns:
- a new JVM object with the pre-existing native object assigned
-
getPathFraction
public float getPathFraction()Return how far the body is along the path initially. The settings are unaffected. (native field: mPathFraction)- Returns:
- the amount
-
getPathPosition
Copy the starting location. The settings are unaffected. (native field: mPathPosition)- Returns:
- a new vector
-
getPathRotation
Copy the initial rotation. The path is unaffected. (native field: mPathRotation)- Returns:
- a new quaternion
-
getPositionMotorSettings
Access the settings of the position motor. (native field: mPositionMotorSettings)- Returns:
- new JVM object with the pre-existing native object assigned
-
getRotationConstraintType
The settings are unaffected. (native field: mRotationConstraintType)- Returns:
- the enum value (not null)
-
setMaxFrictionForce
public void setMaxFrictionForce(float force) Alter the maximum friction force when not driven by a motor. (native field: mMaxFrictionForce)- Parameters:
force- the desired force (in Newtons)
-
setPath
Replace the current path with the specified one. (native field: mPath)- Parameters:
path- the desired path (not null, unaffected)
-
setPathFraction
public void setPathFraction(float amount) Alter how far the body is along the path initially. (native field: mPathFraction)- Parameters:
amount- the desired amount (≥0)
-
setPathPosition
Alter the initial location. (native field: mPathPosition)- Parameters:
location- the desired location (not null, unaffected)
-
setPathRotation
Alter the initial orientation. (native field: mPathRotation)- Parameters:
orientation- the desired orientation (not null, unaffected)
-
setPositionMotorSettings
Alter the motor settings. (native field: mPositionMotorSettings)- Parameters:
motorSettings- the desired settings (not null, unaffected)
-
setRotationConstraintType
Alter the (native field: mRotationConstraintType)- Parameters:
type- the desired type (not null)
-