Collision detection can be an expensive process. To avoid unnecessary processing a two phase approach to collision detection is used. First a inaccurate, yet conservative, algorithm is used to detect possible collision pairs. This process is called the broad-phase. Next, after obtaining all the possible collision pairs, each pair is tested using an accurate algorithm. This is called the narrow-phase. After the narrow-phase is complete, another phase, Manifold generation, generates the contact points.
The narrow-phase also contains classes for supporting multiple detectors at once via the
FallbackNarrowphaseDetector class. Using the
FallbackConditions the detector will determine whether to
use the primary
NarrowphaseDetector or the fallback.
CCD and Raycasting
Outside of what's called discrete collision detection, there's continuous collision detection.
This is the process of detecting (would be) missed collisions in the discrete process since it's only
checking for collisions at instants in time. These detectors implement the
interface and return a
TimeOfImpact object when a collision is
The following is a list of implementations of the above interfaces:
|Collidable<T extends Fixture>||
Represents an object that can collide with other objects.
Interface representing a filter for collision detection.
Abstract implementation of the
|AbstractCollidable<T extends Fixture>||
A base implementation of the
Represents a bounding region that is an Axis-Aligned bounding box.
Convenience class for implementing the
Class used to estimate collision counts and other one-off collision methods and values.
Represents a geometric piece of a