Class CharacterBaseSettings

java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.CharacterBaseSettings
All Implemented Interfaces:
ConstCharacterBaseSettings, ConstJoltPhysicsObject, AutoCloseable, Comparable<JoltPhysicsObject>
Direct Known Subclasses:
CharacterSettings, CharacterVirtualSettings

public class CharacterBaseSettings extends JoltPhysicsObject implements ConstCharacterBaseSettings
Settings used to create a CharacterBase.
  • 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 that the character can walk on. (native attribute: mMaxSlopeAngle)
      Parameters:
      angle - (in radians, default=5*Pi/18)
    • setShape

      public void setShape(ConstShape shape)
      Replace the shape. (native attribute: mShape)
      Parameters:
      shape - the desired shape (not null, unaffected, default=null)
    • setSupportingVolume

      public void setSupportingVolume(ConstPlane plane)
      Alter the supporting volume. (native attribute: mSupportingVolume)
      Parameters:
      plane - the desired plane of support (not null, unaffected, default={(0,1,0),-1e10})
    • setUp

      public void setUp(Vec3Arg direction)
      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:
      getEnhancedInternalEdgeRemoval in interface ConstCharacterBaseSettings
      Returns:
      true to remove ghost contacts, otherwise false
    • getMaxSlopeAngle

      public float getMaxSlopeAngle()
      Return the maximum slope that the character can walk on. The settings are unaffected. (native attribute: mMaxSlopeAngle)
      Specified by:
      getMaxSlopeAngle in interface ConstCharacterBaseSettings
      Returns:
      the angle (in radians)
    • getShape

      public ConstShape getShape()
      Access the Shape. (native attribute: mShape)
      Specified by:
      getShape in interface ConstCharacterBaseSettings
      Returns:
      a new JVM object with the pre-existing native object assigned, or null
    • getSupportingVolume

      public Plane getSupportingVolume()
      Copy the supporting volume. The settings are unaffected. (native attribute: mSupportingVolume)
      Specified by:
      getSupportingVolume in interface ConstCharacterBaseSettings
      Returns:
      a new object
    • getUp

      public Vec3 getUp()
      Copy the character's "up" direction. The settings are unaffected. (native attribute: mUp)
      Specified by:
      getUp in interface ConstCharacterBaseSettings
      Returns:
      a new direction vector (in system coordinates)