Graphics Reference
In-Depth Information
The completed sample maps the E key to toggle the debug renderer on and off.
The following screenshot shows the final result with debug draw switched on:
Physics debug render over 3.5 seconds
How it works…
A prominent part of the physics engine is collision detection. Collision detection typically
involves two phases, a broad phase and a narrow phase. The broad phase detection is usually
where the axis-aligned bounding boxes (AABB) of objects are checked for possible collisions,
where false positives are allowed. Once the broad phase has been completed, and if one or
more possible collisions have been detected, the narrow phase detection is run to determine
where the two shapes are intersecting:
Collision detection: no collision (left), false positive broad-phase collision detected (center), and narrow-phase
collision detected (right)
 
Search WWH ::




Custom Search