Module org.dyn4j

Class DetectFilter<T extends CollisionBody<E>,​E extends Fixture>

    • Constructor Detail

      • DetectFilter

        public DetectFilter​(boolean ignoreSensors,
                            boolean ignoreDisabled,
                            Filter filter)
        Minimal constructor.
        Parameters:
        ignoreSensors - true if fixtures flagged as sensors should be ignored
        ignoreDisabled - true if disabled bodies/fixtures should be ignored
        filter - the Filter to filter fixtures; can be null
    • Method Detail

      • isAllowed

        public boolean isAllowed​(T body,
                                 E fixture)
        Returns true if the given CollisionBody and Fixture is allowed to be in the results of the query.
        Parameters:
        body - the body
        fixture - the fixture
        Returns:
        boolean
      • isIgnoreSensorsEnabled

        public boolean isIgnoreSensorsEnabled()
        Returns true if sensor fixtures should be ignored.
        Returns:
        boolean
      • IsIgnoreDisabledEnabled

        public boolean IsIgnoreDisabledEnabled()
        Returns true if disabled bodies should be ignored.
        Returns:
        boolean
      • getFilter

        public Filter getFilter()
        Returns the fixture-level filter.
        Returns:
        Filter