Parameters for extractFillsTiled. Drives the tiled fill-polygon extractor that powers high-resolution drawing fills without paying O(resolution²) peak memory.

interface ExtractFillsTiledParams {
    aabb: FloatArrayParam;
    basis: ProjectionBasis;
    cancelled?: () => boolean;
    clipPlanes?: { normal: ArrayLike<number>; point: ArrayLike<number> }[];
    collisionIndex?: SceneCollisionIndex;
    meshFilter?: (mesh: SceneMesh, object: SceneObject) => boolean;
    minPixelArea?: number;
    planeDepth: number;
    resolution?: number;
    simplifyEpsilon?: number;
    sourceModel: SceneModel;
    tileSize?: number;
    yield?: () => Promise<void>;
}

Properties

Source-model world AABB (drives the buffer's basis-space extents).

Projection basis (right/up/forward orthonormal triple).

cancelled?: () => boolean

Optional check called between tiles. Return true to abort extraction; the function returns the partial (probably empty) result up to that point. Lets callers pre-empt a long-running extraction when, e.g., the user changes settings mid-flight.

clipPlanes?: { normal: ArrayLike<number>; point: ArrayLike<number> }[]

Optional cut-away clip planes. Each entry is {point, normal} in world space with normal unit length pointing toward the kept half-space. Triangles whose centroid fails any plane's test (dot(centroid - point, normal) < 0) are dropped during tile rasterisation. Mirrors BuildHLEDepthBufferOptions.clipPlanes so HLE and fills agree about what's kept.

collisionIndex?: SceneCollisionIndex

Optional SceneCollisionIndex to narrow candidate objects per tile. Without it the extractor walks every source SceneObject per tile and AABB-tests each — O(N×T). The BVH query is O(log N) per tile, which matters at scale.

meshFilter?: (mesh: SceneMesh, object: SceneObject) => boolean

Optional per-mesh predicate. Returning false excludes the mesh from rasterisation — no triangles are tested, no pixels are owned, no fill polygon is emitted for it. Mirrors BuildHLEDepthBufferOptions.meshFilter; the two are typically supplied together so HLE depth and fill extraction agree on which meshes participate. buildDrawing uses this to drop transparent meshes from the fill pass when transparentAsWireframe is on.

minPixelArea?: number

Drop fills whose summed owner-pixel count across all tiles is below this. Filters out salt-and-pepper noise. Default 4.

planeDepth: number

Basis-space d-coord of the projection plane (where fill polygons land in world space).

resolution?: number

Effective output resolution along the longer of (u, v). The shorter axis is scaled to match the basis-rotated AABB aspect ratio. Default 2048.

simplifyEpsilon?: number

Douglas-Peucker simplification tolerance in pixel units. 0.25 (default) preserves sub-pixel detail while collapsing the redundant collinear vertices marching-squares emits along straight edges. 0 keeps every marching-squares vertex.

sourceModel: SceneModel

Source SceneModel to rasterise.

tileSize?: number

Per-tile pixel size (square). Default 1024. Smaller tiles bound memory more tightly but pay more per-tile overhead (BVH query + halo rasterisation duplication).

yield?: () => Promise<void>

Optional callback awaited between tiles so the host renderer can paint the partial result (or any other work can interleave) while extraction streams through. Without a yield callback the extractor runs straight through to completion — the right shape when the caller wants a single atomic drawing with no intermediate frames.

Called once per tile after that tile's rasterise + marching-squares is done; not called inside a tile (one 1024² tile is bounded at ~100 ms even on dense BIM, which is well below a render budget). Not called during the final per-owner stitch + triangulate pass — that pass is cheap relative to rasterisation.