Skip to main content

Module spatial

Module spatial 

Source
Expand description

Spatial structures: axis-aligned bounding box, oriented bounding box, quadtree, octree, frustum.

Structsยง

AABB
2D axis-aligned bounding box.
AABB3
3D axis-aligned bounding box.
Frustum
View frustum defined by 6 planes (near, far, left, right, top, bottom). Each plane is (nx, ny, nz, d) where nxx + nyy + nz*z + d = 0.
OBB
2D oriented bounding box: center, half-extents along local axes, rotation angle.
Octree
Simple octree for 3D point queries.
Quadtree
Simple quadtree for 2D point queries.