Module bvol

Source
Expand description

Bounding volumes and culling primitives.

The initial implementation here was gleaned from treeculler, which unfortunately cannot compile to SPIR-V because of its use of u8.

Also, here we use glam, whereas treeculler uses its own internal primitives.

More resources:

Structs§

Aabb
Axis aligned bounding box.
BoundingBox
Bounding box consisting of a center and three half extents.
BoundingSphere
Bounding sphere consisting of a center and radius.
Frustum
Six planes of a view frustum.

Traits§

BVol
Bounding volume trait.

Functions§

dist_bpp
Calculates distance between plane and point
intersect_planes
Find the intersection point of three planes.
mi_vertex
Calculates the most inside vertex of an AABB.
mo_vertex
Calculates the most outside vertex of an AABB.
normalize_plane
Normalize a plane.