Skip to content

cf_frustum_from_m4

Category: math
GitHub: cute_math3d.h


Extracts the six frustum planes from a combined view-projection matrix.

CF_Frustum cf_frustum_from_m4(CF_M4x4 m)
Parameters Description
m Typically projection * view from the same matrices handed to the 3d camera
stacks (cf_perspective/cf_ortho times cf_look_at).

Remarks

Plane normals point inward and are normalized. Uses CF's clip conventions (clip-space z in [0, 1], matching SDL_GPU and everything cf_perspective emits).

CF_Frustum
cf_frustum_test_aabb3
cf_frustum_test_sphere