Package com.github.stephengold.joltjni
Class CollisionEstimationResult
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.CollisionEstimationResult
- All Implemented Interfaces:
ConstJoltPhysicsObject
,AutoCloseable
,Comparable<JoltPhysicsObject>
Store estimates of the contact and friction impulses associated with a
collision, along with the resulting body velocities.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCopy the angular velocity of body 1.Copy the angular velocity of body 2.Impulse[]
Access the impulse for every contact point, as an array.Copy the linear velocity of body 1.Copy the linear velocity of body 2.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
Constructor Details
-
CollisionEstimationResult
public CollisionEstimationResult()Instantiate a default estimate.
-
-
Method Details
-
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
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)
-
getImpulses
Access the impulse for every contact point, as an array. (native attribute: mImpulses)- Returns:
- a new array of new JVM objects with pre-existing native objects assigned
-
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
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)
-