@pmndrs/bvh
    Preparing search index...

    Class BabylonBvhPicker

    The CPU picker of a Babylon scene; see the file comment.

    Index
    source: Scene | readonly AbstractMesh[]
    • get instanceCount(): number

      Instances (meshes and InstancedMeshes) the picker sees.

      Returns number

    • scene.pick(x, y): the closest triangle under the pixel (x, y) of the scene's canvas, cast from options.camera or the active camera.

      Parameters

      Returns PickingInfo

    • The closest triangle along ray, as scene.pickWithRay returns it (a PickingInfo with hit false on a miss). The ray's length limits it.

      Parameters

      Returns PickingInfo

    • Reads the scene again (world matrices, visibility, isPickable, added and removed meshes) and builds trees for geometry it has not seen. rebuild: true rebuilds every tree (after editing vertex data in place). Returns whether any mesh was built.

      Parameters

      • options: { rebuild?: boolean } = {}

      Returns boolean