Small World Engine API Reference - v0.46.1
    Preparing search index...

    Class Frustum

    A class representing a camera frustum defined by 6 planes. Used for frustum culling.

    Index

    Constructors

    Properties

    planes: Float32Array = ...

    The planes of the frustum (6 planes * 4 components = 24 floats). Format: Ax + By + Cz + D = 0.

    Methods

    • Checks if a bounding box intersects with the frustum.

      Parameters

      Returns boolean

      True if the box is inside or intersecting the frustum.

    • Checks if a bounding volume intersects with the frustum.

      Parameters

      Returns boolean

      True if the volume is inside or intersecting the frustum.

    • Sets the frustum planes from a projection matrix.

      Parameters

      • m: Matrix4

        The matrix to set from (usually View-Projection).

      Returns void