playcanvas-opti-pixel - v1.2.0
    Preparing search index...

    Interface IHierarchicalZBufferTester

    Interface for working with an occlusion culling testing system. Allows registering BoundingBox objects, enqueueing them for testing, and checking if the object is occluded by other scene geometry.

    interface IHierarchicalZBufferTester {
        _ocTesterType: string;
        hzb: IHierarchicalZBuffer;
        frameUpdate(dt: number): void;
        getDebugInfo(index: number): IDebugInfo;
        lock(
            boundingBox: BoundingBox,
            matrix?: Mat4,
            extra1?: number,
            extra2?: number,
        ): number;
        lockMinMaxScalars(
            data: ArrayLike<number>,
            offset: number,
            matrix?: Mat4,
            extra1?: number,
            extra2?: number,
        ): number;
        unlock(id: number): void;
    }

    Hierarchy (View Summary)

    Implemented by

    Index
    _ocTesterType: string
    • Registers a BoundingBox for subsequent occlusion testing.

      Parameters

      • boundingBox: BoundingBox

        The bounds of the object in local or world coordinates.

      • Optionalmatrix: Mat4

        Optional transformation matrix (if a local BoundingBox is used).

      • Optionalextra1: number

        Optional extra data 1.

      • Optionalextra2: number

        Optional extra data 2.

      Returns number

      A unique identifier for the registered object.

    • Registers a BoundingBox for subsequent occlusion testing.

      Parameters

      • data: ArrayLike<number>

        The array containing the bounding box data (min and max points) in local or world coordinates [minX, maxX, minY, maxY, minZ, maxZ].

      • offset: number

        The offset in the array where the bounding box data starts.

      • Optionalmatrix: Mat4

        Optional transformation matrix (if a local BoundingBox is used).

      • Optionalextra1: number

        Optional extra data 1.

      • Optionalextra2: number

        Optional extra data 2.

      Returns number

      A unique identifier for the registered object.