Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Type Alias BspTreeNode

    BspTreeNode:
        | { part: number; axis?: undefined }
        | {
            axis: number;
            split: number;
            left: BspTreeNode;
            right: BspTreeNode;
            part?: undefined;
        }

    A node of the serialized BSP tree (bsp_tree partition attr).

    An INTERNAL node carries the split plane: axis (a center-column index) and split coordinate (in the parts' local center space), with left = the side where coord < split and right = coord >= split. A LEAF node holds part, the partition child's child_index.

    Point/gsplat parts are BSP cells, so their tree gives an exact back-to-front painter's-algorithm order for any camera pose, including inside the volume. Lines/mesh split polyline/face centroids, so geometry can cross a cut and the same traversal is approximate. At each node recurse the far side of split first. See ../../rendering/depth-sort-coordinator.