Module org.dyn4j
Package org.dyn4j.collision.broadphase
Sub package of the Collision package handling broad-phase collision detection.
Broad-phase collision detection is the process of detecting collision between all the CollisionBody
Fixture
s. The broad-phase attempts to reduce the O(n2) complexity of
this process by using specialized data structures. The broad-phase is not exact, but instead finds pairs of
Fixture
s that could be colliding. While not exact, the broad-phase is conservative.
In other words, the broad-phase will never miss collisions, but will detect false positives.
There are two broad-phase implementations at this time: Sap
and
DynamicAABBTree
, each with their
own merits and drawbacks. The DynamicAABBTree
is the default.
- Since:
- 1.0.0
- Version:
- 4.0.0
- Author:
- William Bittle
-
Interface Summary Interface Description AABBExpansionMethod<T> Represents a rule used to expand an AABB based on the given type T.AABBProducer<T> Represents a way to generate an AABB from a given object.BroadphaseDetector<T> Represents a broad-phase collision detection algorithm.BroadphaseDetectorDecorator<T> Represents a wrapper around aBroadphaseDetector
.BroadphaseFilter<T> Represents a filter used during aBroadphaseDetector
's pair detection process.CollisionItemBroadphaseDetector<T extends CollisionBody<E>,E extends Fixture> -
Class Summary Class Description AbstractBroadphaseDetector<T> Abstract implementation of aBroadphaseDetector
.BroadphaseDetectorDecoratorAdapter<T> A default implementation of the theBroadphaseDetectorDecorator
interface.BruteForceBroadphase<T> This class implements the simplest possible broad-phase detector, a brute-force algorithm for finding all pairs of collisions (and similar queries).CollisionBodyAABBProducer<T extends CollisionBody<?>> AnAABBProducer
forCollisionBody
's which produces a tight fitting AABB based of the current state of the body.CollisionBodyBroadphaseFilter<T extends CollisionBody<?>> ABroadphaseFilter
that ensuresCollisionBody
s are not compared to themselves.CollisionItemAABBProducer<T extends CollisionBody<E>,E extends Fixture> CollisionItemBroadphaseDetectorAdapter<T extends CollisionBody<E>,E extends Fixture> Wraps anyBroadphaseDetector
for use as aCollisionItemBroadphaseDetector
.CollisionItemBroadphaseFilter<T extends CollisionBody<E>,E extends Fixture> ABroadphaseFilter
that ensuresCollisionItem
s of the same body are not compared.DynamicAABBTree<T> Implementation of a self-balancing axis-aligned bounding box tree broad-phase collision detection algorithm.NullAABBExpansionMethod<T> Exapansion method that does nothing to the given AABB.Sap<T> Implementation of the Sweep and Prune broad-phase collision detection algorithm.StaticValueAABBExpansionMethod<T> ExpandsAABB
s by a static amount using theAABB.expand(double)
method.