@pmndrs/bvh
    Preparing search index...

    Class BvhLineLoopBoundsTree

    three-mesh-bvh's LineLoopBVH: for a LineLoop, its closing segment included.

    Hierarchy (View Summary)

    Index
    geometry: BufferGeometry
    segmentMode: BvhSegmentMode = 'loop'

    How this class pairs entries: 'segments'; LineLoopBVH 'loop', LineBVH 'strip'.

    • get depth(): number

      The deepest box's depth, as traverse reports it (the root's children at 1).

      Returns number

    • get primitiveCount(): number

      Returns number

    • three's Line.raycast for object (whose geometry this tree is), over the tree: see the file comment.

      Parameters

      • object: Line
      • raycaster: Raycaster
      • intersects: Intersection<Object3D<Object3DEventMap>>[] = []

      Returns Intersection<Object3D<Object3DEventMap>>[]

    • Walks the tree with CpuMeshBvh.traverse's contract (three-mesh-bvh's shapecast): depth first, the root's box never asked about, each child scored once by boundsTraverseOrder and the lower score first, a falsy intersectsBounds skipping the box, a contained box reported as one range, a truthy intersectsRange stopping the walk. Ranges are tree positions: map them with resolvePrimitiveIndex. Returns true when stopped.

      Parameters

      Returns boolean

    • three-mesh-bvh's node walk, as CpuMeshBvh.traverseNodes (for the helper and the debug functions): every node depth first, the root at depth 0 with the tree's bounds; a leaf gets its first tree position and count, an inner node the axis its children's centres lie furthest apart on.

      Parameters

      • callback: (
            depth: number,
            isLeaf: boolean,
            box: Float32Array,
            offsetOrSplit: number,
            count: number,
        ) => unknown

      Returns void

    • The box around the primitives at tree positions offset to offset + count - 1: read from the source when the tree has one (so edits since the last refit show, as validateBounds wants), else from the records.

      Parameters

      • offset: number
      • count: number
      • target: Float32Array<ArrayBufferLike> | number[] | Float64Array<ArrayBufferLike>
      • targetOffset: number = 0

      Returns void