Expand description
Backend-agnostic frustum culling.
Given a column-major view-projection matrix the six clip-space planes are
extracted using the Gribb-Hartmann method (left/right/bottom/top/near/far).
Frustum::intersects_aabb returns false only when an axis-aligned bounding
box is fully outside at least one plane. False positives are acceptable for
culling (a few extra draws), false negatives are not, so the test treats
the box as visible whenever it overlaps any plane.
Structs§
Functions§
- aabb_
distance_ sq - Squared distance from
camto the closest point on the AABB. Returns 0 ifcamis inside. - transform_
aabb - Compute the world-space AABB enclosing a local-space AABB transformed by a column-major model matrix. All eight corners are transformed and min/max’d component-wise.