Interface ConstCharacterVirtual

All Superinterfaces:
Comparable<JoltPhysicsObject>, ConstCharacterBase, ConstJoltPhysicsObject
All Known Implementing Classes:
CharacterVirtual, CharacterVirtualRef, CharacterVirtualRefC

public interface ConstCharacterVirtual extends ConstCharacterBase
Read-only access to a CharacterVirtual. (native type: const CharacterVirtual)
  • Method Details

    • cancelVelocityTowardsSteepSlopes

      Vec3 cancelVelocityTowardsSteepSlopes(Vec3Arg desiredVelocity)
      Convert the specified velocity to one that won't climb steep slopes. The character is unaffected.
      Parameters:
      desiredVelocity - velocity vector (in system coordinates, not null, unaffected)
      Returns:
      a new velocity vector (in system coordinates)
    • canWalkStairs

      boolean canWalkStairs(Vec3Arg desiredVelocity)
      Test whether the character has moved onto a steep slope. The character is unaffected.
      Parameters:
      desiredVelocity - velocity vector (in system coordinates, not null, unaffected)
      Returns:
      true if too step to walk, otherwise false
    • getActiveContacts

      ConstContact[] getActiveContacts()
      Copy the list of active contacts. The character is unaffected.
      Returns:
      a new array of new objects
    • getCenterOfMassPosition

      RVec3 getCenterOfMassPosition()
      Calculate the location of the character's center of mass. The character is unaffected.
      Returns:
      a new location vector (in system coordinates)
    • getCenterOfMassTransform

      RMat44 getCenterOfMassTransform()
      Calculate the local-to-system transform of the character's center of mass. The character is unaffected.
      Returns:
      a new coordinate transform matrix
    • getCharacterPadding

      float getCharacterPadding()
      Return the thickness of the character's padding. The character is unaffected.
      Returns:
      the thickness (in meters)
    • getEnhancedInternalEdgeRemoval

      boolean getEnhancedInternalEdgeRemoval()
      Test whether enhanced internal edge removal is enabled. The character is unaffected.
      Returns:
      true if enabled, otherwise false
    • getHitReductionCosMaxAngle

      float getHitReductionCosMaxAngle()
      Return the maximum angle for merging during hit reduction. The character is unaffected.
      Returns:
      the cosine of the maximum angle, or -1 if hit reduction is disabled
    • getId

      int getId()
      Return the character's ID. The character is unaffected.
      Returns:
      a CharacterId value
    • getInnerBodyId

      int getInnerBodyId()
      Return the ID of the inner body. The character is unaffected.
      Returns:
      the BodyID value
    • getLinearVelocity

      Vec3 getLinearVelocity()
      Copy the linear velocity of the character. The character is unaffected.
      Returns:
      a new velocity vector (meters per second in system coordinates)
    • getMass

      float getMass()
      Return the character's mass. The character is unaffected.
      Returns:
      the mass (in kilograms)
    • getMaxHitsExceeded

      boolean getMaxHitsExceeded()
      Test whether the last collision check discarded one or more hits. The character is unaffected.
      Returns:
      true if discarded hits, otherwise false
    • getMaxNumHits

      int getMaxNumHits()
      Return the maximum number of hits to be collected. The character is unaffected.
      Returns:
      the limit (≥0)
    • getMaxStrength

      float getMaxStrength()
      Return the maximum force applied to other bodies. The character is unaffected.
      Returns:
      the force (in Newtons)
    • getPenetrationRecoverySpeed

      float getPenetrationRecoverySpeed()
      Return how quickly penetration is resolved. The character is unaffected.
      Returns:
      the resolution fraction (0=never resolved, 1=all in one update)
    • getPosition

      RVec3 getPosition()
      Copy the location of the character. The character is unaffected.
      Returns:
      a new location vector (in system coordinates)
    • getPositionAndRotation

      void getPositionAndRotation(RVec3 storeLocation, Quat storeOrientation)
      Copy the position of the character. The character is unaffected.
      Parameters:
      storeLocation - storage for the location (in system coordinates, not null, modified)
      storeOrientation - storage for the orientation (in system coordinates, not null, modified)
    • getRotation

      Quat getRotation()
      Copy the orientation of the character. The character is unaffected.
      Returns:
      a new rotation quaternion (in system coordinates)
    • getShapeOffset

      Vec3 getShapeOffset()
      Copy the local offset applied to the shape. The character is unaffected.
      Returns:
      a new offset vector (in local coordinates)
    • getTransformedShape

      TransformedShape getTransformedShape()
      Return a TransformedShape that represents the volume occupied by the character. The character is unaffected.
      Returns:
      a new object
    • getUserData

      long getUserData()
      Return the character's user data: can be used for anything. The character is unaffected.
      Returns:
      the value
    • getWorldTransform

      RMat44 getWorldTransform()
      Calculate the character's local-to-system coordinate transform. The character is unaffected.
      Returns:
      a new transform matrix
    • hasCollidedWith

      boolean hasCollidedWith(int bodyId)
      Test whether the character is in contact with or collided with the specified body during the previous time step. The character is unaffected.
      Parameters:
      bodyId - the ID of the body to test against
      Returns:
      true if contact or collision, otherwise false
    • hasCollidedWith

      boolean hasCollidedWith(ConstCharacterVirtual other)
      Test whether the character is in contact with or has collided with the specified character during the previous time step. The current character is unaffected.
      Parameters:
      other - the character to test against (not null, unaffected)
      Returns:
      true if contact or collision, otherwise false
    • toRefC

      Create a counted reference to the native CharacterVirtual.
      Returns:
      a new JVM object with a new native object assigned