Module org.dyn4j
Package org.dyn4j.world
Class DetectFilter<T extends CollisionBody<E>,E extends Fixture>
- Object
-
- DetectFilter<T,E>
-
- Type Parameters:
T
- theCollisionBody
typeE
- theFixture
type
public class DetectFilter<T extends CollisionBody<E>,E extends Fixture> extends Object
Represents the filters for queries against aCollisionWorld
.- Since:
- 4.0.0
- Version:
- 4.0.0
- Author:
- William Bittle
-
-
Constructor Summary
Constructors Constructor Description DetectFilter(boolean ignoreSensors, boolean ignoreDisabled, Filter filter)
Minimal constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Filter
getFilter()
Returns the fixture-level filter.boolean
isAllowed(T body, E fixture)
Returns true if the givenCollisionBody
andFixture
is allowed to be in the results of the query.boolean
IsIgnoreDisabledEnabled()
Returns true if disabled bodies should be ignored.boolean
isIgnoreSensorsEnabled()
Returns true if sensor fixtures should be ignored.
-
-
-
Constructor Detail
-
DetectFilter
public DetectFilter(boolean ignoreSensors, boolean ignoreDisabled, Filter filter)
Minimal constructor.- Parameters:
ignoreSensors
- true if fixtures flagged as sensors should be ignoredignoreDisabled
- true if disabled bodies/fixtures should be ignoredfilter
- theFilter
to filter fixtures; can be null
-
-
Method Detail
-
isAllowed
public boolean isAllowed(T body, E fixture)
Returns true if the givenCollisionBody
andFixture
is allowed to be in the results of the query.- Parameters:
body
- the bodyfixture
- 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
-
-