Frontmost-triangle depth buffer used by the projection pipeline for hidden-line elimination and (optionally) for driving per-pixel ownership during fill extraction.

Owner tracking is at source-mesh granularity so downstream code that emits projected geometry can partition output to mirror the source SceneModel's hierarchy one-to-one. Two parallel index tables map the integer owner back to source identifiers:

Cells the rasteriser never touched are -1. All three owner-related fields are null when owner tracking was disabled.

interface HLEDepthBuffer {
    basis: ProjectionBasis;
    data: Float32Array;
    height: number;
    ownerMeshIds: string[];
    ownerObjectIds: string[];
    owners: Int32Array<ArrayBufferLike>;
    uMax: number;
    uMin: number;
    vMax: number;
    vMin: number;
    width: number;
}

Properties

Projection basis used to build the buffer.

data: Float32Array

width × height Float32 depth values.

height: number
ownerMeshIds: string[]

Owner index → source SceneMesh id. Same length as the number of source SceneMeshes that contributed at least one triangle to the rasteriser.

ownerObjectIds: string[]

Owner index → id of the source SceneObject the mesh at that index belongs to. Same length as ownerMeshIds. Lets the fill extractor partition by SceneObject while keeping per-mesh fidelity inside each object.

owners: Int32Array<ArrayBufferLike>

Optional per-pixel owner index, parallel to data. -1 means the pixel was never touched by any triangle. Present only when the buffer was built with withOwners.

uMax: number
uMin: number

Basis-space u extent (right-axis projection of the AABB).

vMax: number
vMin: number

Basis-space v extent (up-axis projection of the AABB).

width: number