Scene whose BVH gets queried. The strategy borrows the scene's shared "../collision".SceneCollisionIndex, so destroying this strategy does not destroy the index — callers can keep using BVH queries directly afterwards.
Optionalraycaster: SceneRaycasterOptional injected raycaster. Lets tests stub the underlying raycast and lets multiple strategies share one raycaster if a caller already has one to hand.
ReadonlystateMonotonic counter that bumps every time the strategy's internal state changes in a way that invalidates cached results — for example, when a RoutingPickStrategy's renderer becomes available, or its WebGL context is lost. A future memoising decorator compares this against the epoch stamped on cached results to know when to drop them.
Strategies whose state never changes (e.g. BVHPickStrategy)
may always return 0.
Run one pick. Sync — even when the GPU backend is involved,
gl.readPixels blocks until the result is in. See
PickResult for what's populated.
BVH-backed picking strategy — wraps SceneRaycaster.
What works:
objectId,meshId,worldPos,triangleIndex;filter,tMin,tMax,pickInvisible(mapped ontovisiblePickableOnly).What doesn't:
null.worldNormal,localPos,uv— not provided by the BVH path; leftnullon the result.Stateless after construction; stateEpoch stays
0.