Module org.dyn4j

Class ConvexCastAdapter

  • All Implemented Interfaces:
    ConvexCastListener, Listener

    @Deprecated
    public class ConvexCastAdapter
    extends Object
    implements ConvexCastListener
    Deprecated.
    Deprecated in 4.0.0. Use the iterator methods in the World class instead.
    Default implementation of the ConvexCastListener interface.

    Inherit from this class to only implement the desired methods.

    By default all methods return true.

    Since:
    3.1.5
    Version:
    4.0.0
    Author:
    William Bittle
    • Constructor Detail

      • ConvexCastAdapter

        public ConvexCastAdapter()
        Deprecated.
    • Method Detail

      • allow

        public boolean allow​(Convex convex,
                             Body body,
                             BodyFixture fixture)
        Deprecated.
        Description copied from interface: ConvexCastListener
        Called before the given fixture is cast against.

        Returning true from this method indicates that the cast should be performed.

        Use this method to filter fixtures from the tests to improve performance.

        Specified by:
        allow in interface ConvexCastListener
        Parameters:
        convex - the convex being cast
        body - the body
        fixture - the body fixture
        Returns:
        boolean true if the body should be tested
      • allow

        public boolean allow​(Convex convex,
                             Body body,
                             BodyFixture fixture,
                             TimeOfImpact toi)
        Deprecated.
        Description copied from interface: ConvexCastListener
        Called after the given fixture has been cast against and a collision was detected.

        Returning true from this method indicates that this time of impact result should be used by the final result.

        Specified by:
        allow in interface ConvexCastListener
        Parameters:
        convex - the convex being cast
        body - the body
        fixture - the body fixture
        toi - the time of impact
        Returns:
        boolean true if the body should be tested