UNPKG

aabb-tree

Version:

Basic implementation of the AABB-Tree (Axis Aligned Box Bounding Tree)

16 lines (15 loc) 557 B
import Vector3 from './Vector3'; import Vector2 from './Vector2'; export default class AABB { readonly lowPoint: Vector3 | Vector2; readonly highPoint: Vector3 | Vector2; constructor(minX: number, minY: number, minZ: number | null, maxX: number, maxY: number, maxZ: number | null); Merge(other: AABB): AABB; Overlaps(other: AABB): boolean; ContainsPoint(point: Vector3 | Vector2): boolean; readonly is3D: boolean; readonly Width: number; readonly Height: number; readonly Depth: number; readonly Space: number; }