Extends
Methods
canCollide(a, b)
Checks to see if two bodies can proceed to have their bounding boxes checked
Parameters:
Name | Type | Description |
---|---|---|
a |
Body | |
b |
Body |
- Inherited From:
- Source:
draw()
Renders a representation of a broadphase
- Inherited From:
- Source:
getCollisionPairs(target) → {Array.<CollisionPair>}
Gets all possibly colliding pairs.
Parameters:
Name | Type | Description |
---|---|---|
target |
Array.<CollisionPair> | Empty array to store results. |
- Inherited From:
- Source:
Returns:
- Type
- Array.<CollisionPair>
insert(obj)
Adds a body to the broadphase
Parameters:
Name | Type | Description |
---|---|---|
obj |
Body |
- Inherited From:
- Source:
query(bounds, target) → {Array.<Body>}
Returns bodies that are within the given bound.
Parameters:
Name | Type | Description |
---|---|---|
bounds |
Bounds | Region to check in. |
target |
Array.<Body> | Empty array to store results. |
- Inherited From:
- Source:
Returns:
- Type
- Array.<Body>
remove(obj)
Removes a body from the broadphase
Parameters:
Name | Type | Description |
---|---|---|
obj |
Body |
- Inherited From:
- Source:
update(bodies)
Updates the internals of the broadphase if needed.
Parameters:
Name | Type | Description |
---|---|---|
bodies |
Array.<Body> |
- Inherited From:
- Source: