@pmndrs/bvh
    Preparing search index...

    Class GpuMeshRefit

    Refits one mesh's tree from moved vertices, every frame if need be. Needs subgroups (for the refit).

    Index
    • get memoryBytes(): number

      GPU bytes of this refit's own buffers (the tree belongs to the caller, a shared box buffer to its pool).

      Returns number

    • Parameters

      • encoder: GPUCommandEncoder

      Returns void

    • Parameters

      • device: GPUDevice

      Returns boolean

    • The tree moved to another place in the target's node buffer (a scene that compacted its nodes, SceneTrees.trim): its root is now at nodeWordOffset, as setTree's placement names it. The shape, the triangles' place and the stats stay.

      Parameters

      • nodeWordOffset: number

      Returns void

    • Stats readback (diagnostics only), as for the top-level refit: poll at a frame's start, copy after the submit's encode.

      Returns void

    • Compiles the kernels, or waits for the shared ones.

      Returns Promise<void>