OptionalboundsScores a box, once per child; of two siblings the lower score is visited first (left first on a tie). Without it, left before right.
Whether the walk enters a box. A falsy answer (false, undefined,
BVH_NOT_INTERSECTED) skips it; BVH_CONTAINED reports the
box's whole subtree as one contained range without asking about the
boxes below it; anything else truthy (BVH_INTERSECTED, true)
enters it. isLeaf: the box holds a triangle range rather than two more
boxes. score is boundsTraverseOrder's for this box (undefined
without one). The root's box is never asked about, as in three-mesh-bvh:
the first boxes asked are the root's children, at depth 1.
A range of tree positions, offset to offset + count - 1: an entered
leaf's (contained false), or a contained box's whole subtree (one call,
contained true). A truthy return stops the walk, and
CpuMeshBvh.traverse returns true.
The callbacks of CpuMeshBvh.traverse: three-mesh-bvh's
shapecastcallbacks, with its argument order.boxis[minX, minY, minZ, maxX, maxY, maxZ]in a scratch array that is only valid during the call; copy it to keep it.nodeIndexnames the box: the child slot it is in (parentNode * 2 + side, 0 for left, 1 for right), unique per box in this tree and below2 * nodeCount. A tree whose root is one leaf reports that leaf as 0.Ranges are tree positions (three-mesh-bvh's indirect mode): read them with CpuMeshBvh.getTriangle or map them to the original triangle with CpuMeshBvh.resolveTriangleIndex.