The tree's buffer (see createBoxTreeBuffer).
Protected_Float32 view of the whole buffer, as long as it was when last read.
Protected_Int32 view of the whole buffer, as long as it was when last read.
ReadonlybufferThe tree's nodes: grown by its writer, the same buffer.
ReadonlyisTells a BoxTree (a reader, the BoxTree or its BoxTreeStructure) apart.
Float32 view of the whole buffer; made again when it grew.
Int32 view of the whole buffer; made again when it grew.
The root node, or -1 when the tree is empty.
Protected_Views of a fixed length on the whole buffer (see the class).
Nodes traverse visits with these options.
The leaves whose box holds the point, the nearest box centre first.
The leaves whose box the ray crosses, nearest entry first.
Grows every box by this much on each side.
Only the leaf whose box the ray enters first (default): the boxes the ray enters farther than it are not walked.
Calls callback on each node, depth first from the root.
Reads a BoxTree in its shared buffer, from any thread, while its writer (the
BoxTreeWorker) changes it: a query walks the tree as it is, and stops at what a write in progress left unlinked (a freed node, a child past the views). It may then miss a leaf for that instant.The leaves hold ids (in the scene's tree, a part's or a sprite's: see
LeafIds): the queries give them, their objects are the caller's.Its views (f32, i32) have a fixed length, made again when the writer grew the buffer: V8 reads a view that tracks a growable buffer's length 4 to 5 times slower.