Creates a raycaster for the given Scene. Lazily borrows the shared collision index — destroying this raycaster does not destroy the index.
ReadonlycollisionBVH index used to narrow ray-vs-AABB candidates before triangle work.
ReadonlysceneScene this raycaster is bound to.
Performs one raycast.
Always returns {ok: true, value: SceneRaycastResult} for a successful test —
a "miss" is value.hit === false, not an error. {ok: false} is
reserved for invalid input (no spatial spec, more than one spatial
spec, canvasPos without a view).
BVH-narrowed, triangle-precise CPU raycaster against a Scene. Layered on top of SceneCollisionIndex and intersectSceneRayTriangle.
One call, three input shapes:
{origin, dir}ray;The raycaster resolves whichever shape was supplied to a world-space ray, runs the BVH-narrowed triangle-precise raycast, and returns a single SceneRaycastResult (hit or miss) wrapped in SDKResult.
One raycaster per Scene; the underlying BVH is shared via getSceneCollisionIndex, so multiple raycasters on the same Scene cooperate cleanly.
Most callers shouldn't construct this directly — the higher-level unified picking surface in
picking/(seeBVHPickStrategy/RoutingPickStrategy) is the recommended entry point. Reach forSceneRaycasterwhen you need the low-level raycast primitive (e.g. headless ray queries with no view, or to compose your own picking strategy).