Taos API Reference
    Preparing search index...

    Class Frustum

    View frustum as 6 planes extracted from a view-projection matrix (Gribb–Hartmann), normalized so a plane evaluation yields a true signed distance. Reused in place via setFromViewProj to keep per-frame culling allocation-free.

    Plane order is 0 left, 1 right, 2 bottom, 3 top, 4 far, 5 near. The near plane (toward the camera / light) is intentionally last so callers that must keep geometry in front of it — e.g. shadow depth-clamp "pancaking", where an occluder closer to the light than the cascade box still casts — can test only the first five planes by passing planeCount = 5.

    Clip-space convention is WebGPU's: x,y ∈ [-1, 1], z ∈ [0, 1].

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    planes: Float32Array<ArrayBuffer> = ...

    6 planes × (a, b, c, d), normalized so (a, b, c) is unit length.

    Methods

    • Recomputes the 6 planes from a view-projection matrix. Returns this so callers can chain a test right after.

      Parameters

      Returns this

    • Returns true if the world-space sphere is at least partially inside the frustum (conservative: never reports a visible sphere as culled).

      Tests planeCount planes (default all 6). Pass 5 to skip the near plane — see the class note on shadow pancaking.

      Parameters

      • cx: number
      • cy: number
      • cz: number
      • r: number
      • planeCount: number = 6

      Returns boolean