Broadphase Class
Base class for broadphase implementations.
Constructor
Broadphase
()
Methods
boundingRadiusCheck
(
Boolean
-
bodyA
-
bodyB
Check whether the bounding radius of two bodies overlap.
Returns:
Boolean:
boundingRadiusCheck
(
Boolean
-
bodyA
-
bodyB
Check whether the bounding radius of two bodies overlap.
Returns:
Boolean:
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:
getCollisionPairs
(
Array
-
world
Get all potential intersecting body pairs.
Parameters:
-
world
WorldThe world to search in.
Returns:
Array:
An array of the bodies, ordered in pairs. Example: A result of [a,b,c,d] means that the potential pairs are: (a,b), (c,d).
setWorld
(
-
world
Set the world that we are searching for collision pairs in
Parameters:
-
world
World
Properties
AABB
Number
static
Axis aligned bounding box type.
BOUNDING_CIRCLE
Number
static
Bounding circle type.
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().