-
- All Known Implementing Classes:
CategoryFilter
,TypeFilter
public interface Filter
Interface representing a filter for collision detection.Filters allow the collision detection system to skip expensive operations between
Fixture
s that shouldn't be colliding at all.The
DEFAULT_FILTER
allows all fixture collisions.- Since:
- 1.0.0
- Version:
- 3.0.2
- Author:
- William Bittle
-
-
Field Summary
Fields Modifier and Type Field Description static Filter
DEFAULT_FILTER
The default filter which always returns true
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isAllowed(Filter filter)
-
-
-
Field Detail
-
DEFAULT_FILTER
static final Filter DEFAULT_FILTER
The default filter which always returns true
-
-
Method Detail
-
isAllowed
boolean isAllowed(Filter filter)
Returns true if the givenFilter
and thisFilter
allow the objects to interact.If the given
Filter
is not the same type as thisFilter
its up to the implementing class to specify the behavior.In addition, if the given
Filter
is null its up to the implementing class to specify the behavior.- Parameters:
filter
- the otherFilter
- Returns:
- boolean
-
-