Class CAAT.Module.Collision.QuadTree
Defined in: Quadtree.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
For each quadtree level this keeps the list of overlapping elements.
|
|
For each quadtree, this quadData keeps another 4 quadtrees up to the maximum recursion level.
|
Method Attributes | Method Name and Description |
---|---|
<private> |
__getOverlappingActorList(actorList)
|
create(l, t, r, b, backgroundElements, minWidth, maxElements)
|
|
getOverlappingActors(rectangle)
Call this method to thet the list of colliding elements with the parameter rectangle.
|
Field Detail
bgActors
For each quadtree level this keeps the list of overlapping elements.
quadData
For each quadtree, this quadData keeps another 4 quadtrees up to the maximum recursion level.
Method Detail
<private>
__getOverlappingActorList(actorList)
- Parameters:
- actorList
create(l, t, r, b, backgroundElements, minWidth, maxElements)
- Parameters:
- l
- t
- r
- b
- backgroundElements
- minWidth
- maxElements
{Array}
getOverlappingActors(rectangle)
Call this method to thet the list of colliding elements with the parameter rectangle.
- Parameters:
- rectangle
- Returns:
- {Array}