Package com.github.stephengold.joltjni
Class ExtendedUpdateSettings
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.ExtendedUpdateSettings
- All Implemented Interfaces:
ConstJoltPhysicsObject
,AutoCloseable
,Comparable<JoltPhysicsObject>
Settings for extended update of a virtual character. (native type:
CharacterVirtual::ExtendedUpdateSettings
)-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCopy the StickToFloor inStepDown parameter.float
Return the cosine of the maximum angle between the ground normal and the horizontal for adjusting the step-forward test.float
Return the StickToFloor inStepForward parameter.float
Return the StickToFloor inStepForwardTest parameter.Copy the StickToFloor inStepUp parameter.void
setStickToFloorStepDown
(Vec3Arg offset) Alter the StickToFloor inStepDown parameter.void
setWalkStairsCosAngleForwardContact
(float cosine) Alter the cosine of the maximum angle between the ground normal and the horizontal for adjusting the step-forward test.void
setWalkStairsMinStepForward
(float distance) Alter the StickToFloor inStepForward parameter.void
setWalkStairsStepForwardTest
(float distance) Alter the StickToFloor inStepForwardTest parameter.void
setWalkStairsStepUp
(Vec3Arg offset) Alter the StickToFloor inStepUp parameter.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
Constructor Details
-
ExtendedUpdateSettings
public ExtendedUpdateSettings()Instantiate default settings.
-
-
Method Details
-
getStickToFloorStepDown
Copy the StickToFloor inStepDown parameter. The settings are unaffected. (native attribute: mStickToFloorStepDown)- 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)- Returns:
- the cosine of the maximum angle
-
getWalkStairsMinStepForward
public float getWalkStairsMinStepForward()Return the StickToFloor inStepForward parameter. The settings are unaffected. (native attribute: mWalkStairsMinStepForward)- Returns:
- the distance
-
getWalkStairsStepForwardTest
public float getWalkStairsStepForwardTest()Return the StickToFloor inStepForwardTest parameter. The settings are unaffected. (native attribute: mWalkStairsStepForwardTest)- Returns:
- the distance
-
getWalkStairsStepUp
Copy the StickToFloor inStepUp parameter. The settings are unaffected. (native attribute: mWalkStairsStepUp)- Returns:
- a new offset vector
-
setStickToFloorStepDown
Alter the StickToFloor inStepDown parameter. (native attribute: mStickToFloorStepDown)- Parameters:
offset
- the desired offset (not null, unaffected, zero=off, default=(0, -0.5, 0))
-
setWalkStairsCosAngleForwardContact
public void setWalkStairsCosAngleForwardContact(float cosine) 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))
-
setWalkStairsMinStepForward
public void setWalkStairsMinStepForward(float distance) Alter the StickToFloor inStepForward parameter. (native attribute: mWalkStairsMinStepForward)- Parameters:
distance
- the desired distance (default=0.02f)
-
setWalkStairsStepForwardTest
public void setWalkStairsStepForwardTest(float distance) Alter the StickToFloor inStepForwardTest parameter. (native attribute: mWalkStairsStepForwardTest)- Parameters:
distance
- the desired distance (default=0.15f)
-
setWalkStairsStepUp
Alter the StickToFloor inStepUp parameter. (native attribute: mWalkStairsStepUp)- Parameters:
offset
- the desired offset (not null, unaffected, zero=off, default=(0, 0.4, 0))
-