Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BVHNode

A node in the BVHTree structure

Hierarchy

  • BVHNode

Index

Constructors

constructor

  • new BVHNode(extentsMin: Vector3, extentsMax: Vector3, startIndex: number, endIndex: number, level: number): BVHNode
  • Constructor of BVHNode

    Parameters

    • extentsMin: Vector3

      the min coords of this node's bounding box ({x,y,z})

    • extentsMax: Vector3

      the max coords of this node's bounding box ({x,y,z})

    • startIndex: number

      an index in the bbox array, where the first element of this node is located

    • endIndex: number

      an index in the bbox array, where the last of this node is located, plus 1 (meaning that its non-inclusive).

    • level: number

    Returns BVHNode

Properties

endIndex

endIndex: number

extentsMax

extentsMax: Vector3

extentsMin

extentsMin: Vector3

level

level: number

node0

node0: BVHNode | null

node1

node1: BVHNode | null

startIndex

startIndex: number

Methods

calcBoundingSphereRadius

  • calcBoundingSphereRadius(extentsMin: Vector3, extentsMax: Vector3): number
  • Parameters

    • extentsMin: Vector3
    • extentsMax: Vector3

    Returns number

centerX

  • centerX(): number
  • Returns number

centerY

  • centerY(): number
  • Returns number

centerZ

  • centerZ(): number
  • Returns number

clearShapes

  • clearShapes(): void
  • Returns void

elementCount

  • elementCount(): number
  • Returns number