Class OctreeNode

OctreeNode

Hierarchy (view full)

Constructors

  • Parameters

    • Optional options: {
          aabb?: AABB;
          root?: Octree;
      }
      • Optional aabb?: AABB

        Boundary of this node

      • Optional root?: Octree

        The root node

    Returns OctreeNode

Properties

aabb: AABB

Boundary of this node

children: OctreeNode[]

Children to this node

data: number[]

Contained data at the current node level

The root node

Methods

  • Get all data, potentially within an AABB

    Parameters

    • aabb: AABB
    • result: number[]

    Returns number[]

    The "result" object

  • Insert data into this node

    Parameters

    • aabb: AABB
    • elementData: number
    • Optional level: number

    Returns boolean

    True if successful, otherwise false

  • Get all data, potentially intersected by a ray.

    Parameters

    Returns number[]

    The "result" object

  • removeEmptyNodes

    Returns void

  • reset

    Returns void

  • Create 8 equally sized children nodes and put them in the children array.

    Returns void