Module org.dyn4j

Class DetectAdapter

  • All Implemented Interfaces:
    DetectListener, Listener

    @Deprecated
    public class DetectAdapter
    extends Object
    implements DetectListener, Listener
    Deprecated.
    Deprecated in 4.0.0. Use the iterator methods in the World class instead.
    Convenience class for implementing the DetectListener interface.

    This class can be used to implement only the methods desired instead of all the methods contained in the DetectListener interface.

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

      • DetectAdapter

        public DetectAdapter()
        Deprecated.
    • Method Detail

      • allow

        public boolean allow​(AABB aabb,
                             Body body,
                             BodyFixture fixture)
        Deprecated.
        Description copied from interface: DetectListener
        Called before the BodyFixture is tested against the given AABB.

        Return false from this method to eliminate this fixture from the list of results. Return false also improves performance by reducing the number of collision tests.

        This method is only called by the World.detect(AABB,...) methods.

        Specified by:
        allow in interface DetectListener
        Parameters:
        aabb - the AABB given
        body - the Body whose AABB overlaps the given AABB
        fixture - the BodyFixture that is about to be tested
        Returns:
        boolean true to allow this body to be included in the results
      • allow

        public boolean allow​(Convex convex,
                             Transform transform,
                             Body body)
        Deprecated.
        Description copied from interface: DetectListener
        Called after the given Convex has been found to overlap the a Body.

        Return false from this method to eliminate this body from the list of results.

        This method is only called by the World.detect(Convex,...) methods.

        Specified by:
        allow in interface DetectListener
        Parameters:
        convex - the convex given to the World.detect method
        transform - the transform given to the World.detect method
        body - the Body whose AABB overlaps the given AABB
        Returns:
        boolean true to allow this body to be included in the results
      • allow

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

        Return false from this method to eliminate this fixture from the list of results. Return false also improves performance by reducing the number of collision tests.

        This method is only called by the World.detect(Convex,...) methods.

        Specified by:
        allow in interface DetectListener
        Parameters:
        convex - the convex given to the World.detect method
        transform - the transform given to the World.detect method
        body - the Body whose AABB overlaps the given AABB
        fixture - the BodyFixture that is about to be tested
        Returns:
        boolean true to allow this body to be included in the results