API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classDynamicAabbTree
Boundless, incrementally-updated bounding-volume hierarchy over fat AABBs (Box2D b2DynamicTree-style). Generic sibling of Quadtree: no world bounds, no max depth; leaves persist across updates and are only reinserted when their tight AABB escapes the stored fat AABB. Internals: an index-based node pool (a growable array of plain objects, mirroring the reuse-by-index idiom used elsewhere in the engine) with a free-list of freed slot indices for reuse. Insertion picks the sibling that minimises the surface-area-heuristic (SAH) cost of the resulting subtree; the ancestor chain is rebalanced on the way back to the root with AVL-style rotations on the height-imbalance factor - both exactly as in Box2D's `b2DynamicTree`. All public methods are allocation-free after the pool has grown to its working-set size.
import { DynamicAabbTree } from '@codexo/exojs'Boundless, incrementally-updated bounding-volume hierarchy over fat AABBs (Box2D b2DynamicTree-style). Generic sibling of Quadtree: no world bounds, no max depth; leaves persist across updates and are only reinserted when their tight AABB escapes the stored fat AABB.
Internals: an index-based node pool (a growable array of plain objects, mirroring the reuse-by-index idiom used elsewhere in the engine) with a free-list of freed slot indices for reuse. Insertion picks the sibling that minimises the surface-area-heuristic (SAH) cost of the resulting subtree; the ancestor chain is rebalanced on the way back to the root with AVL-style rotations on the height-imbalance factor - both exactly as in Box2D's `b2DynamicTree`. All public methods are allocation-free after the pool has grown to its working-set size.
new(margin: number): DynamicAabbTree<T>clear(): voiddestroy(): voidfatAabbOf(proxy: number, out: AabbLikeStructural type for an axis-aligned bounding box given as min/max extents. This is the canonical AABB contract across the engine and its packages - broad phase…): AabbLikeStructural type for an axis-aligned bounding box given as min/max extents. This is the canonical AABB contract across the engine and its packages - broad phase…fatOverlaps(proxyA: number, proxyB: number): booleaninsert(minX: number, minY: number, maxX: number, maxY: number, payload: T): numberpayloadOf(proxy: number): Tquery(minX: number, minY: number, maxX: number, maxY: number, callback: (payload: T, proxy: number) => void): voidqueryPoint(x: number, y: number, callback: (payload: T, proxy: number) => void): voidrayCast(originX: number, originY: number, dirX: number, dirY: number, maxDistance: number, callback: (payload: T, proxy: number) => void): voidremove(proxy: number): voidupdate(proxy: number, minX: number, minY: number, maxX: number, maxY: number): booleanheight: numberleafCount: number