Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: ContactImpulse

[18:7] extends: FxObj

Wraps jbox2d's ContactImpulse (com.almasb.fxgl.physics.box2d.callbacks.ContactImpulse), the payload passed to ContactListener.postSolve. Carries the normal and tangent impulses for each contact point plus the active count. The two impulse arrays are pooled, so do not retain them past the postSolve call — copy the values you need.

Methods

  • ContactImpulse ()

    Empty default constructor; populated by adopt.

  • adopt (object Ajo)

    Wraps an existing ContactImpulse AussomJavaObject.

  • getCount ()

    Returns the active contact-point count.

  • getNormalImpulses ()

    Returns the normal impulses as a Java float[] AJO.

  • getTangentImpulses ()

    Returns the tangent impulses as a Java float[] AJO.