Module org.dyn4j

Interface TimeOfImpactListener

  • All Superinterfaces:
    Listener
    All Known Implementing Classes:
    TimeOfImpactAdapter

    @Deprecated
    public interface TimeOfImpactListener
    extends Listener
    Deprecated.
    Deprecated in 4.0.0. Use the TimeOfImpactListener in the world package instead.
    Interface to listen for time of impact events.

    Time of impact events are events fired when a collision was missed by the discrete collision detection routines, and then caught by the continuous collision detection routines.

    Modification of the World is not permitted during these methods.

    Since:
    1.2.0
    Version:
    4.0.0
    Author:
    William Bittle
    • Method Detail

      • collision

        boolean collision​(Body body1,
                          BodyFixture fixture1,
                          Body body2,
                          BodyFixture fixture2,
                          TimeOfImpact toi)
        Deprecated.
        Called when a time of impact has been detected between two bodies.

        Returning true from this method indicates that the collision of these two Bodys should be processed (solved).

        The values of the toi parameter can be changed in this method.

        Parameters:
        body1 - the first Body
        fixture1 - the first Body's fixture
        body2 - the second Body
        fixture2 - the second Body's fixture
        toi - the TimeOfImpact
        Returns:
        boolean true if the collision should be handled
        Since:
        2.0.0