@pmndrs/bvh
    Preparing search index...

    Function meshRefitPlacement

    • What a GpuMeshRefit.setTree needs for input mesh meshIndex of an assembled scene (a deforming mesh refit in the scene's shared buffers): the word offsets and, in an indexed scene, the mesh's vertex base, vertex count and the positions layout. Throws for a mesh merged into a static group: merged records are world space and name source-mesh triangles, so a refit from the source's object-space vertices would corrupt them. Merged ranges are never refit. Throws for a welded mesh of an indexed scene too: the refit copies the app's vertex v to scene vertex vertexBase + v, which only holds when the scene kept the app's numbering. Assemble meshes you will refit with weld: false (and no weldTolerance).

      Parameters

      • scene: Pick<TraceSceneData, "meshes"> & Partial<
            Pick<TraceSceneData, "nodeFormat" | "triangleLeaves" | "positionLayout">,
        >
      • meshIndex: number

      Returns MeshRefitPlacement