@pmndrs/bvh
    Preparing search index...

    Interface MeshLayoutBuildOptions

    Options of MeshLayoutBuilder.buildLayouts: the builders' common ones, and timing.

    interface MeshLayoutBuildOptions {
        intersectionCost?: number;
        maxLeafPrimitives?: number;
        nodeFormat?: "f32" | "quantized";
        onGpuBatch?: (batch: MeshLayoutGpuBatch) => void;
        traversalCost?: number;
        triangleLeading?: readonly number[];
        triangleLeaves?: "records" | "indexed";
    }

    Hierarchy (View Summary)

    Index
    intersectionCost?: number

    SAH cost of testing one triangle. Default 1.

    maxLeafPrimitives?: number

    Largest leaf the SAH collapse may make. 1 to 8; default 8, the layout's largest leaf.

    nodeFormat?: "f32" | "quantized"

    The node format the tree is written in: 'f32' (64 bytes, the default for a mesh tree; a scene quantizes it as it places it, DEFAULT_NODE_FORMAT) or 'quantized' (32-byte nodes on a per-mesh grid, the frame slot first; docs/internals/design/compressed-nodes.md). A coordinate of magnitude 2^100 or more, or a non-finite one, makes a quantized box empty on that axis (hits there are lost).

    onGpuBatch?: (batch: MeshLayoutGpuBatch) => void

    Called once per GPU batch with its times, before the call resolves. A GPU builder only (tinybvh is never called, the fallback included); the batch's pass is timed with timestamp queries only when this is given.

    traversalCost?: number

    SAH cost of visiting a node, relative to intersectionCost. Default 1.

    triangleLeading?: readonly number[]

    Per mesh of a batch: triangles (in the output format's units, 48 or 16 bytes) left free before the mesh's triangles in the batch's triangle buffer, so a scene that adopts the buffer can write what goes there (an indexed scene's mesh header and side tables: SceneTrees with gpuTreeOutputs: 'adopt'). Each range's triangleOffset is after its gap. Default: none (every mesh's triangles right after the last's).

    triangleLeaves?: "records" | "indexed"

    The triangle format the tree is written in: 'records' (48 bytes, the default) or 'indexed' (16 bytes, mesh-relative vertex indices; docs/internals/design/indexed-leaves.md). The nodes are the same either way.