@ue-too/dynamics / index / QuadTree
類別: QuadTree<T>
定義於: quadtree.ts:36
QuadTree spatial indexing structure for efficient collision detection.
型別參數
T
T extends QuadTreeObject
實作
SpatialIndex<T>
建構函式
建構函式
new QuadTree<
T>(level,bounds):QuadTree<T>
定義於: quadtree.ts:45
參數
level
number
bounds
回傳
QuadTree<T>
方法
clear()
clear():
void
定義於: quadtree.ts:70
回傳
void
實作了
draw()
draw(
context):void
定義於: quadtree.ts:52
參數
context
CanvasRenderingContext2D
回傳
void
實作了
getIndex()
getIndex(
vBody):-1|0|1|2|3
定義於: quadtree.ts:121
參數
vBody
T
回傳
-1 | 0 | 1 | 2 | 3
insert()
insert(
vBody):void
定義於: quadtree.ts:148
參數
vBody
T
回傳
void
實作了
retrieve()
retrieve(
vBody):T[]
定義於: quadtree.ts:183
參數
vBody
T
回傳
T[]
實作了
split()
split():
void
定義於: quadtree.ts:81
回傳
void