NaiveBroadphase

NaiveBroadphase

Most basic broadphase.Should be used when number of bodies are few(i.e less than 100)

Constructor

new NaiveBroadphase()

Source:

Methods

getCollisionPairs(target) → {Array.<CollisionPair>}

Source:
Parameters:
Name Type Description
target Array.<CollisionPair> Empty array to store results.
Returns:
Type
Array.<CollisionPair>

query(bound, target) → {Array.<Entity>}

Source:
Parameters:
Name Type Description
bound BoundingBox Region to check in.
target Array.<Entity> Empty array to store results.
Returns:
Type
Array.<Entity>

update(entities, bounds)

Source:
Parameters:
Name Type Description
entities Array.<Array.<Entity>>
bounds Array.<Array.<BoundingBox>>