NarrowphaseDetectors can only perform on
Shapes. This allows for fast
and simple algorithms. Non-convex shapes can be decomposed using a
Convex pieces which can then be tested individually.
Penetration objects representing the vector of minimum
magnitude able to push the
of penetration. This information is typically passed onto a
to find the collision points.
This package also contains a
FallbackNarrowphaseDetector class. This class is
used to build a hierarchy of
NarrowphaseDetectors that can select detection
algorithms based on arbitrary conditions. For example, in the case of
Gjk could be the fallback detector while
Sat is the primary. Fallback is determined by the assigned
RaycastDetectors can return a
object which contains the point the
Ray intersects the shape, the normal and the
distance. For raycasting, it's also advisable to perform a raycast against a
first to rule out the obvious failures.
Represents a condition that returns true to indicate a fallback
Interface used to modify the narrow-phase collision information before being sent to listeners.
Abstract implementation of the
Class devoted to
Implementation of the Gilbert-Johnson-Keerthi (GJK) algorithm for collision detection.
Represents a point in the
Implementation of the Separating Axis Theorem (SAT) for collision detection.
Class devoted to improving performance of