SAPBroadphase Class
Sweep and prune broadphase along one axis.
Constructor
SAPBroadphase
()
Item Index
Methods
Properties
Methods
boundingRadiusCheck
(
Boolean
-
bodyA
-
bodyB
Check whether the bounding radius of two bodies overlap.
Returns:
Boolean:
canCollide
(
Boolean
-
bodyA
-
bodyB
Check whether two bodies are allowed to collide at all.
Returns:
Boolean:
checkBounds
(
Boolean
static
-
bi
-
bj
-
axisIndex
Check if the bounds of two bodies overlap, along the given SAP axis.
Returns:
Boolean:
sortAxisListX
(
Array
-
a
Sorts bodies along the X axis.
Parameters:
-
a
Array
Returns:
Array:
sortAxisListY
(
Array
-
a
Sorts bodies along the Y axis.
Parameters:
-
a
Array
Returns:
Array:
Properties
axisListX
Array
List of bodies currently in the broadphase.
axisListY
Array
List of bodies currently in the broadphase.
boundingVolumeType
Number
The bounding volume type to use in the broadphase algorithms.
result
Array
The resulting overlapping pairs. Will be filled with results during .getCollisionPairs().