BVH-narrowed, triangle-precise CPU raycaster against a Scene. Layered on top of SceneCollisionIndex and intersectSceneRayTriangle.

One call, three input shapes:

  • canvas-pixel cursor position (with a View);
  • a world-space {origin, dir} ray;
  • a 4×4 transform that maps a canonical local ray to world space.

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/ (see BVHPickStrategy / RoutingPickStrategy) is the recommended entry point. Reach for SceneRaycaster when you need the low-level raycast primitive (e.g. headless ray queries with no view, or to compose your own picking strategy).

Constructors

Properties

Methods

Constructors

Properties

collisionIndex: SceneCollisionIndex

BVH index used to narrow ray-vs-AABB candidates before triangle work.

scene: Scene

Scene this raycaster is bound to.

Methods