SAP1DBroadphase Class
Sweep and prune broadphase along one axis.
Constructor
Item Index
Methods
boundingRadiusCheck
(
Boolean
-
bodyA
-
bodyB
Check whether the bounding radius of two bodies overlap.
Returns:
Boolean:
sortAxisListX
(
Number
-
bodyA
-
bodyB
Function for sorting bodies along the X axis. To be passed to array.sort()
Returns:
Number:
Properties
axisIndex
Number
Axis to sort the bodies along. Set to 0 for x axis, and 1 for y axis. For best performance, choose an axis that the bodies are spread out more on.
axisList
Array
List of bodies currently in the broadphase.