Package com.github.stephengold.joltjni
Class CharacterBaseSettings
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.CharacterBaseSettings
- All Implemented Interfaces:
ConstCharacterBaseSettings,ConstJoltPhysicsObject,AutoCloseable,Comparable<ConstJoltPhysicsObject>
- Direct Known Subclasses:
CharacterSettings,CharacterVirtualSettings
Settings used to create a
CharacterBase.-
Method Summary
Modifier and TypeMethodDescriptionbooleanTest whether to make an extra effort to remove contacts with internal edges.floatReturn the maximum slope on which the character can walk.getShape()Acquire read-only access to theShape.Return the supporting volume.getUp()Return the character's "up" direction.voidsetEnhancedInternalEdgeRemoval(boolean remove) Alter whether to make an extra effort to remove contacts with internal edges.voidsetMaxSlopeAngle(float angle) Alter the maximum slope on which the character can walk.voidsetShape(ConstShape shape) Replace the shape.voidReplace the shape.voidsetSupportingVolume(ConstPlane plane) Alter the supporting volume.voidAlter the character's "up" direction.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, startCleaner, 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, va
-
Method Details
-
setEnhancedInternalEdgeRemoval
public void setEnhancedInternalEdgeRemoval(boolean remove) Alter whether to make an extra effort to remove contacts with internal edges. (native attribute: mEnhancedInternalEdgeRemoval)- Parameters:
remove- true to remove ghost contacts (default=false)
-
setMaxSlopeAngle
public void setMaxSlopeAngle(float angle) Alter the maximum slope on which the character can walk. (native attribute: mMaxSlopeAngle)- Parameters:
angle- (in radians, default=5*Pi/18)
-
setShape
Replace the shape. (native attribute: mShape)- Parameters:
shape- the desired shape (not null, unaffected)
-
setShape
Replace the shape. (native attribute: mShape)- Parameters:
shapeRef- a reference to the desired shape (not null)
-
setSupportingVolume
Alter the supporting volume. (native attribute: mSupportingVolume)- Parameters:
plane- (not null, default={(0,1,0),-1e10})
-
setUp
Alter the character's "up" direction. (native attribute: mUp)- Parameters:
direction- the desired direction (not null, unaffected, default=(0,1,0))
-
getEnhancedInternalEdgeRemoval
public boolean getEnhancedInternalEdgeRemoval()Test whether to make an extra effort to remove contacts with internal edges. The settings are unaffected. (native attribute: mEnhancedInternalEdgeRemoval)- Specified by:
getEnhancedInternalEdgeRemovalin interfaceConstCharacterBaseSettings- Returns:
- true to remove ghost contacts, otherwise false
-
getMaxSlopeAngle
public float getMaxSlopeAngle()Return the maximum slope on which the character can walk. The settings are unaffected. (native attribute: mMaxSlopeAngle)- Specified by:
getMaxSlopeAnglein interfaceConstCharacterBaseSettings- Returns:
- the angle (in radians)
-
getShape
Acquire read-only access to theShape. The settings are unaffected. (native attribute: mShape)- Specified by:
getShapein interfaceConstCharacterBaseSettings- Returns:
- a new JVM object with the pre-existing native object assigned, or
null
-
getSupportingVolume
Return the supporting volume. The settings are unaffected. (native attribute: mSupportingVolume)- Specified by:
getSupportingVolumein interfaceConstCharacterBaseSettings- Returns:
- a new JVM object with the pre-existing native object assigned
-
getUp
Return the character's "up" direction. The settings are unaffected. (native attribute: mUp)- Specified by:
getUpin interfaceConstCharacterBaseSettings- Returns:
- a new direction vector (in system coordinates)
-