GridBroadphase Class
Axis aligned uniform grid broadphase.
Constructor
Item Index
Methods
Properties
Methods
aabbQuery
(
Array
-
world
-
aabb
Returns all the bodies within the AABB.
Returns:
Array:
collisionPairs
(
-
world
-
pairs1
-
pairs2
Get all the collision pairs in the physics world
Parameters:
-
world
World -
pairs1
Array -
pairs2
Array
doBoundingBoxBroadphase
(
-
Body
-
Body
-
pairs1
-
pairs2
Check if the bounding boxes of two bodies are intersecting.
Parameters:
-
Body
Objectbi
-
Body
Objectbj
-
pairs1
Array -
pairs2
Array
doBoundingSphereBroadphase
(
-
bi
-
bj
-
pairs1
-
pairs2
Check if the bounding spheres of two bodies are intersecting.
intersectionTest
(
-
bodyA
-
bodyB
-
pairs1
-
pairs2
Check if the bounding volumes of two bodies intersect.
makePairsUnique
(
-
pairs1
-
pairs2
Removes duplicate pairs from the pair arrays.
Parameters:
-
pairs1
Array -
pairs2
Array
needBroadphaseCollision
(
Bool
-
bodyA
-
bodyB
Check if a body pair needs to be intersection tested at all.
Returns:
Bool:
Properties
useBoundingBoxes
Boolean
If set to true, the broadphase uses bounding boxes for intersection test, else it uses bounding spheres.