- Object
-
- BroadphaseFilterAdapter<T,E>
-
- CollisionBodyBroadphaseFilter<T,BodyFixture>
-
- PhysicsBodyBroadphaseFilter<T>
-
- Type Parameters:
T
- thePhysicsBody
type
- All Implemented Interfaces:
BroadphaseFilter<T,BodyFixture>
public class PhysicsBodyBroadphaseFilter<T extends PhysicsBody> extends CollisionBodyBroadphaseFilter<T,BodyFixture> implements BroadphaseFilter<T,BodyFixture>
Encapsulates logic used to filter the broadphase pairs based on filters, body state, etc.Extend this class to add additional filtering capabilities to the broad-phase.
- Since:
- 3.2.0
- Version:
- 4.0.0
- Author:
- William Bittle
-
-
Constructor Summary
Constructors Constructor Description PhysicsBodyBroadphaseFilter(PhysicsWorld<T,?> world)
Minimal constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isAllowed(T body1, BodyFixture fixture1, T body2, BodyFixture fixture2)
Returns true if this result should be added to the results list.
-
-
-
Constructor Detail
-
PhysicsBodyBroadphaseFilter
public PhysicsBodyBroadphaseFilter(PhysicsWorld<T,?> world)
Minimal constructor.- Parameters:
world
- the world
-
-
Method Detail
-
isAllowed
public boolean isAllowed(T body1, BodyFixture fixture1, T body2, BodyFixture fixture2)
Description copied from interface:BroadphaseFilter
Returns true if this result should be added to the results list.- Specified by:
isAllowed
in interfaceBroadphaseFilter<T extends PhysicsBody,BodyFixture>
- Overrides:
isAllowed
in classCollisionBodyBroadphaseFilter<T extends PhysicsBody,BodyFixture>
- Parameters:
body1
- the firstCollisionBody
fixture1
- the firstCollisionBody
sFixture
body2
- the secondCollisionBody
fixture2
- the secondCollisionBody
sFixture
- Returns:
- boolean
-
-