Class CollisionEstimationResult

java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.CollisionEstimationResult
All Implemented Interfaces:
ConstJoltPhysicsObject, AutoCloseable, Comparable<JoltPhysicsObject>

public class CollisionEstimationResult extends JoltPhysicsObject
Store estimates of the contact and friction impulses associated with a collision, along with the resulting body velocities.
  • Constructor Details

    • CollisionEstimationResult

      public CollisionEstimationResult()
      Instantiate a default estimate.
  • Method Details

    • getAngularVelocity1

      public Vec3 getAngularVelocity1()
      Copy the angular velocity of body 1. The estimate is unaffected. (native attribute: mAngularVelocity1)
      Returns:
      a new velocity vector (radians per second in system coordinates)
    • getAngularVelocity2

      public Vec3 getAngularVelocity2()
      Copy the angular velocity of body 2. The estimate is unaffected. (native attribute: mAngularVelocity2)
      Returns:
      a new velocity vector (radians per second in system coordinates)
    • getContactImpulses

      public float[] getContactImpulses()
      Copy the impulses to an array. (native attribute: mContactImpulse)
      Returns:
      a new array of impulses (in kilogram.meter per second)
    • getLinearVelocity1

      public Vec3 getLinearVelocity1()
      Copy the linear velocity of body 1. The estimate is unaffected. (native attribute: mLinearVelocity1)
      Returns:
      a new velocity vector (meters per second in system coordinates)
    • getLinearVelocity2

      public Vec3 getLinearVelocity2()
      Copy the linear velocity of body 2. The estimate is unaffected. (native attribute: mLinearVelocity1)
      Returns:
      a new velocity vector (meters per second in system coordinates)