BVH2D

open class BVH2D<T>(val allowUpdateObjects: Boolean = true)

A Bounding Volume Hierarchy implementation for 2D. It uses Rectangle to describe volumes and Ray for raycasting.

Constructors

Link copied to clipboard
constructor(allowUpdateObjects: Boolean = true)

Properties

Link copied to clipboard
Link copied to clipboard
val bvh: BVH<T>

Functions

Link copied to clipboard
fun debug()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun insertOrUpdate(rect: Rectangle, obj: T)
Link copied to clipboard
fun intersect(ray: Ray, return_array: FastArrayList<BVH.IntersectResult<T>> = fastArrayListOf()): FastArrayList<BVH.IntersectResult<T>>
Link copied to clipboard
fun intersectRay(ray: Ray, rect: Rectangle? = null): BVHRect?
Link copied to clipboard
fun remove(obj: T)
fun remove(rect: Rectangle, obj: T? = null): FastArrayList<BVH.Node<T>>
Link copied to clipboard
fun search(rect: Rectangle, return_array: FastArrayList<BVH.Node<T>> = fastArrayListOf()): FastArrayList<BVH.Node<T>>