Package com.github.stephengold.joltjni
Class PathConstraintSettings
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.PathConstraintSettings
- All Implemented Interfaces:
ConstConstraintSettings
,ConstJoltPhysicsObject
,RefTarget
,AutoCloseable
,Comparable<JoltPhysicsObject>
Settings used to construct a
PathConstraint
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
Return the maximum friction force when not driven by a motor.getPath()
Access the path.float
Return 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.void
setMaxFrictionForce
(float force) Alter the maximum friction force when not driven by a motor.void
setPath
(PathConstraintPath path) Replace the current path with the specified one.void
setPathFraction
(float amount) Alter how far the body is along the path initially.void
setPathPosition
(Vec3Arg location) Alter the initial location.void
setPathRotation
(QuatArg orientation) Alter the initial orientation.void
setPositionMotorSettings
(MotorSettings motorSettings) Alter the motor settings.void
Alter the (native field: mRotationConstraintType)Methods inherited from class com.github.stephengold.joltjni.TwoBodyConstraintSettings
create, toRef
Methods inherited from class com.github.stephengold.joltjni.ConstraintSettings
getConstraintPriority, getControllerType, getDrawConstraintSize, getEnabled, getNumPositionStepsOverride, getNumVelocityStepsOverride, getRefCount, setConstraintPriority, setDrawConstraintSize, 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.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Constructor Details
-
PathConstraintSettings
public PathConstraintSettings()Instantiate default settings.
-
-
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)
-
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)
-