The core scene (null for a scene without meshes).
Instances (objects, instances of instanced and batched meshes, and groups) in the scene.
The sources (object, instance, group) whose world box meets frustum
(three's Frustum.intersectsBox test, on the boxes the walk uses), each
object or instance once. layers (a camera's) limits them to objects on
its layers 0-7.
Optionallayers: { mask: number }The geometry and range (or folded groups) of instance instanceIndex's mesh (for threeFaceIndex, threeGroupOf, threeMaterialOf).
What raycaster.intersectObject(root, true) returns (see the file
comment), appended to intersects and sorted by distance.
three-mesh-bvh's ObjectBVH.shapecast(callbacks) (PARITY 5.3): a walk
over the scene's world boxes (the top level the raycast uses, one box
per object, instance or group, as of the last update) with
three-mesh-bvh's contract: intersectsBounds(box, isLeaf, score, depth, nodeIndex) with a Box3 (scratch, valid during the call) decides which
boxes to enter (CONTAINED takes a box's subtree whole),
boundsTraverseOrder(box) which child first, and
intersectsObject(object, instanceId, contained, depth, source) gets
each object in an entered leaf: instanceId is the InstancedMesh or
BatchedMesh instance, else 0 as in three-mesh-bvh; source is ours
(a multi-material mesh with multiMaterial: 'groups' comes once per
group). intersectsRange(offset, count, contained, depth, nodeIndex, box) gets top-level positions (cpuScene.instanceAt). A truthy return
from either stops the cast; returns true when stopped. Hidden objects
are left out as in the raycast (includeHidden).
The three object behind instance instanceIndex (a hit's instance).
Reads the scene again (call updateMatrixWorld() first): needed after
objects move or change and after geometry edits (see the file comment).
Rebuilds only the top level when the meshes are the same; builds trees
for new geometry or ranges, or edited positions or index, and drops
unused ones. Returns whether meshes changed.
The CPU scene of a three scene; see the file comment.