Package com.github.stephengold.joltjni
Class ExtendedUpdateSettings
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.ExtendedUpdateSettings
- All Implemented Interfaces:
ConstExtendedUpdateSettings,ConstJoltPhysicsObject,AutoCloseable,Comparable<JoltPhysicsObject>
public class ExtendedUpdateSettings
extends JoltPhysicsObject
implements ConstExtendedUpdateSettings
Settings for extended update of a virtual character. (native type:
CharacterVirtual::ExtendedUpdateSettings)-
Constructor Summary
ConstructorsConstructorDescriptionInstantiate default settings.Instantiate a copy of the specified settings. -
Method Summary
Modifier and TypeMethodDescriptionCopy the StickToFloor inStepDown parameter.floatReturn the cosine of the maximum angle between the ground normal and the horizontal for adjusting the step-forward test.floatReturn the StickToFloor inStepForward parameter.floatReturn the StickToFloor inStepForwardTest parameter.Copy the StickToFloor inStepUp parameter.setStickToFloorStepDown(Vec3Arg offset) Alter the StickToFloor inStepDown parameter.setWalkStairsCosAngleForwardContact(float cosine) Alter the cosine of the maximum angle between the ground normal and the horizontal for adjusting the step-forward test.setWalkStairsMinStepForward(float distance) Alter the StickToFloor inStepForward parameter.setWalkStairsStepForwardTest(float distance) Alter the StickToFloor inStepForwardTest parameter.setWalkStairsStepUp(Vec3Arg offset) Alter the StickToFloor inStepUp parameter.Methods 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, targetVa
-
Constructor Details
-
ExtendedUpdateSettings
public ExtendedUpdateSettings()Instantiate default settings. -
ExtendedUpdateSettings
Instantiate a copy of the specified settings.- Parameters:
original- the settings to copy (notnull, unaffected)
-
-
Method Details
-
setStickToFloorStepDown
Alter the StickToFloor inStepDown parameter. (native attribute: mStickToFloorStepDown)- Parameters:
offset- the desired offset (notnull, unaffected, zero=off, default=(0, -0.5, 0))- Returns:
- the modified settings, for chaining
-
setWalkStairsCosAngleForwardContact
Alter the cosine of the maximum angle between the ground normal and the horizontal for adjusting the step-forward test. (native attribute: mWalkStairsCosAngleForwardContact)- Parameters:
cosine- the cosine of the maximum angle (default=cos(75 degrees))- Returns:
- the modified settings, for chaining
-
setWalkStairsMinStepForward
Alter the StickToFloor inStepForward parameter. (native attribute: mWalkStairsMinStepForward)- Parameters:
distance- the desired distance (default=0.02f)- Returns:
- the modified settings, for chaining
-
setWalkStairsStepForwardTest
Alter the StickToFloor inStepForwardTest parameter. (native attribute: mWalkStairsStepForwardTest)- Parameters:
distance- the desired distance (default=0.15f)- Returns:
- the modified settings, for chaining
-
setWalkStairsStepUp
Alter the StickToFloor inStepUp parameter. (native attribute: mWalkStairsStepUp)- Parameters:
offset- the desired offset (notnull, unaffected, zero=off, default=(0, 0.4, 0))- Returns:
- the modified settings, for chaining
-
getStickToFloorStepDown
Copy the StickToFloor inStepDown parameter. The settings are unaffected. (native attribute: mStickToFloorStepDown)- Specified by:
getStickToFloorStepDownin interfaceConstExtendedUpdateSettings- Returns:
- a new offset vector
-
getWalkStairsCosAngleForwardContact
public float getWalkStairsCosAngleForwardContact()Return the cosine of the maximum angle between the ground normal and the horizontal for adjusting the step-forward test. The settings are unaffected. (native attribute: mWalkStairsCosAngleForwardContact)- Specified by:
getWalkStairsCosAngleForwardContactin interfaceConstExtendedUpdateSettings- Returns:
- the cosine of the maximum angle
-
getWalkStairsMinStepForward
public float getWalkStairsMinStepForward()Return the StickToFloor inStepForward parameter. The settings are unaffected. (native attribute: mWalkStairsMinStepForward)- Specified by:
getWalkStairsMinStepForwardin interfaceConstExtendedUpdateSettings- Returns:
- the distance
-
getWalkStairsStepForwardTest
public float getWalkStairsStepForwardTest()Return the StickToFloor inStepForwardTest parameter. The settings are unaffected. (native attribute: mWalkStairsStepForwardTest)- Specified by:
getWalkStairsStepForwardTestin interfaceConstExtendedUpdateSettings- Returns:
- the distance
-
getWalkStairsStepUp
Copy the StickToFloor inStepUp parameter. The settings are unaffected. (native attribute: mWalkStairsStepUp)- Specified by:
getWalkStairsStepUpin interfaceConstExtendedUpdateSettings- Returns:
- a new offset vector
-