getIndex(rect) → {number} Determine which node the object belongs to. Parameters
level : number The current level. Source code:
bounds : Object Object that contains the quadtree bounds. Source code:
retrieve(source) → {array} Return all objects that could collide with the given Sprite or Rectangle
new QuadTree(x, y, width, height, maxObjects, maxLevels, level)
reset(x, y, width, height, maxObjects, maxLevels, level)
maxLevels : number The maximum number of levels to break down to. Default
populate(group) Populates this quadtree with the children of the given Group. In order to be added the child must exist and have a body
split() Split the node into 4 subnodes Source code:
insert(body) Insert the object into the node. If the node exceeds the capacity, it will split and add all objects to their corresponding
Page 1 of 2