@pmndrs/bvh
    Preparing search index...

    Type Alias GpuMeshRefitPlacement

    GpuMeshRefitPlacement: {
        generation?: number;
        positionLayout?: "vec4" | "packed";
        triangleWordOffset?: number;
        vertexBase?: number;
        vertexCount?: number;
    } & (
        | { nodeFormat?: "f32"
        | "quantized"; nodeWordOffset?: undefined }
        | { nodeFormat: "f32" | "quantized"; nodeWordOffset: number }
    )

    Where a tree sits for GpuMeshRefit.setTree. A tree inside other buffers (nodeWordOffset, a scene's say) must name the target's nodeFormat: the scene's format is not the layout's. meshRefitPlacement gives both for a scene mesh.

    Type Declaration

    • Optionalgeneration?: number
    • OptionalpositionLayout?: "vec4" | "packed"

      Indexed trees: the positions buffer's layout. Default 'vec4'.

    • OptionaltriangleWordOffset?: number
    • OptionalvertexBase?: number

      Indexed trees, required: the mesh's first vertex in the target's positions buffer (0 for a tree in its own buffers; meshRefitPlacement for a scene mesh).

    • OptionalvertexCount?: number

      Indexed trees: the mesh's vertices there; encode then refuses a posed buffer of another size.

    • { nodeFormat?: "f32" | "quantized"; nodeWordOffset?: undefined }
      • OptionalnodeFormat?: "f32" | "quantized"

        The target's node format. Required with nodeWordOffset (a tree inside other buffers, such as a scene's: the target's format is not the layout's; meshRefitPlacement gives it). Without nodeWordOffset (the tree in its own buffers) it defaults to the layout's. With 'quantized', nodeWordOffset is the root's (its frame slot is the 8 words before; default 8), and the refit runs on an f32 copy then packs it into the target.

      • OptionalnodeWordOffset?: undefined

        The tree in its own buffers (word 0; with quantized nodes, its root after the frame slot).

    • { nodeFormat: "f32" | "quantized"; nodeWordOffset: number }
      • nodeFormat: "f32" | "quantized"

        The target's node format, required here.

      • nodeWordOffset: number

        Where the mesh's root sits in the target node buffer, in words.