API Docs for: 0.6.1
Show:

Octree Class

Extends OctreeNode

Methods

aabbQuery

(
  • aabb
  • result
)
Array

Get all data, potentially within an AABB

Parameters:

  • aabb AABB
  • result Array

Returns:

Array:

The "result" object

insert

(
  • aabb
  • elementData
)
Boolean

Insert data into this node

Parameters:

  • aabb AABB
  • elementData Object

Returns:

Boolean:

True if successful, otherwise false

rayQuery

(
  • ray
  • treeTransform
  • result
)
Array

Get all data, potentially intersected by a ray.

Parameters:

Returns:

Array:

The "result" object

removeEmptyNodes

()

subdivide

()

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

Properties

aabb

AABB

Boundary of this node

children

Array

Children to this node

data

Array

Contained data at the current node level.

maxDepth

Number

Maximum subdivision depth

root

OctreeNode

The root node