Documentation - v20.0.0-dev
    Preparing search index...

    A binary tree built over boxes, apart from any BoxTree: what buildSubtree gives, in typed arrays only (transferable: it can be built in a worker), added to a tree with BoxTree.addSubtree.

    A child is an internal node (>= 0: its index) or a leaf (< 0: -1 - leaf, the leaf being the box's index in leafBoxes). The internal nodes come after their parent.

    interface BoxSubtree {
        children: Int32Array;
        leafBoxes: Float32Array;
        nodeBoxes: Float32Array;
        root: number;
    }
    Index

    Properties

    children: Int32Array

    The internal nodes' children, 2 each (left, right), coded as above.

    leafBoxes: Float32Array

    The leaves' boxes, 6 floats each (min xyz, max xyz), in the order given.

    nodeBoxes: Float32Array

    The internal nodes' boxes, 6 floats each: the union of their children's.

    root: number

    The root, coded as a child: the leaf alone when there is one.