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.
- William Bittle
Interface Summary Interface Description DistanceDetector FallbackConditionRepresents a condition that returns true to indicate a fallback
NarrowphaseDetectorshould be used instead of the primary.
MinkowskiPenetrationSolver NarrowphaseDetector NarrowphasePostProcessorInterface used to modify the narrow-phase collision information before being sent to listeners. RaycastDetector
Class Summary Class Description AbstractFallbackConditionAbstract implementation of the
CircleDetectorClass devoted to
Epa ExpandingSimplexRepresents a simplex that is progressively expanded by splitting the closest edge to the origin by adding new points. ExpandingSimplexEdgeRepresents an edge of an
FallbackNarrowphaseDetector GjkImplementation of the Gilbert-Johnson-Keerthi (GJK) algorithm for collision detection. LinkPostProcessor MinkowskiSum MinkowskiSumPointRepresents a point in the
TypedFallbackConditionthat filters on a particular pair of types.
Penetration Raycast SatImplementation of the Separating Axis Theorem (SAT) for collision detection. SegmentDetectorClass devoted to improving performance of
Separation SingleTypedFallbackConditionRepresents a
TypedFallbackConditionthat filters on a single type.