@pmndrs/bvh
    Preparing search index...

    Interface MeshInput

    Triangle geometry in object space, as CPU arrays. Every builder takes it.

    interface MeshInput {
        indices?:
            | Uint32Array<ArrayBufferLike>
            | Uint16Array<ArrayBufferLike>
            | null;
        positions: Float32Array;
        triangleFlags?: Uint32Array<ArrayBufferLike> | null;
        triangleMaterials?:
            | Uint32Array<ArrayBufferLike>
            | Uint16Array<ArrayBufferLike>
            | ArrayLike<number>
            | null;
    }
    Index
    indices?: Uint32Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | null

    Three vertex indices per triangle; omit for a plain triangle list.

    positions: Float32Array

    x, y, z per vertex.

    triangleFlags?: Uint32Array<ArrayBufferLike> | null

    Per-triangle flags, indexed by the original triangle number; they default to 0. Only bit 0 (TRIANGLE_FLAG_FILTER: ask the triangle filter) may be set. Bits 1-31 are reserved: bit 1 flips frontFace on merged static meshes' triangles, bits 2-15 are 0, and bits 16-31 carry a merged triangle's source material, which the scene assembly writes from the instance's material (or from triangleMaterials). Every builder throws, naming the triangle, if a reserved bit is set.

    triangleMaterials?:
        | Uint32Array<ArrayBufferLike>
        | Uint16Array<ArrayBufferLike>
        | ArrayLike<number>
        | null

    Per-triangle material index, by original triangle number: 0-65534, or TRIANGLE_MATERIAL_NONE (0xffff; NO_MATERIAL, 0xffffffff, too) for none. A hit on a triangle with a material reports it as BvhHit.material; one without falls back to its instance's material. Records keep it in flags bits 16-31 (material + 1), every builder writes it there; indexed scenes keep a per-mesh table before the mesh's header (docs/internals/design/indexed-leaves.md). Omit it (the default) for the instance's material only. Anything else throws, naming the triangle.