java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.Impulse
- All Implemented Interfaces:
ConstJoltPhysicsObject
,AutoCloseable
,Comparable<JoltPhysicsObject>
The estimated friction impulses of a collision. (native type:
CollisionEstimationResult::Impulse
)-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
Return the contact (normal) component.float
Return the friction component in the direction of tangent 1.float
Return the friction component in the direction of tangent 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
-
Impulse
public Impulse()Instantiate a default estimate.
-
-
Method Details
-
getContactImpulse
public float getContactImpulse()Return the contact (normal) component. The estimate is unaffected. (native attribute: mContactImpulse)- Returns:
- the impulse component (in kilogram-meters per second)
-
getFrictionImpulse1
public float getFrictionImpulse1()Return the friction component in the direction of tangent 1. The estimate is unaffected. (native attribute: mFrictionImpulse1)- Returns:
- the impulse component (in kilogram-meters per second)
-
getFrictionImpulse2
public float getFrictionImpulse2()Return the friction component in the direction of tangent 2. The estimate is unaffected. (native attribute: mFrictionImpulse2)- Returns:
- the impulse component (in kilogram-meters per second)
-