-
Notifications
You must be signed in to change notification settings - Fork 1
Gfx2TreePartitionMethod
jay19240 edited this page Dec 19, 2024
·
3 revisions
A 2D binary tree space partition method for quick search intersections.
-
new Gfx2TreePartitionMethod(rect: Gfx2BoundingRect, axis): Gfx2TreePartitionMethod
- rect: The partition rectangle.
- axis: The partition split axis.
- draw(): void
-
search(node: TreePartitionNode, target: Gfx2BoundingRect, results: Gfx2BoundingRect[])
- node
- target: The target object.
- results: All matching objects.
-
split(objects: Gfx2BoundingRect[]): SplitResult
- objects: A list of bounding rectangle.
-
translate(x: number, y: number): void
- x: The amount of translation in the x-axis direction.
- y: The amount of translation in the y-axis direction.