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:
- William Bittle
Interface Summary Interface Description BoundsRepresents the
Boundsof a simulation.
BoundsListener Collidable<T extends Fixture>Represents an object that can collide with other objects. FilterInterface representing a filter for collision detection.
Class Summary Class Description AbstractBoundsAbstract implementation of the
AbstractCollidable<T extends Fixture>A base implementation of the
AxisAlignedBoundsRepresents a bounding region that is an Axis-Aligned bounding box. BoundsAdapterConvenience class for implementing the
Filterfor categorized fixtures.
CollisionsClass used to estimate collision counts and other one-off collision methods and values. FixtureRepresents a geometric piece of a
FixtureIterator<T extends Fixture> TypeFilter