Class PointOctant<T>

An octant that contains points.

Type Parameters

  • T

    The type of the data.

Hierarchy

Constructors

Properties

children: null | Node[]

The children of this node.

data: null | PointData<T>

The data.

max: Vector3

The upper bounds of the node.

min: Vector3

The lower bounds of this node.

Methods

  • Checks if the given point lies inside this octant's boundaries.

    This method can also be used to check if this octant intersects a sphere by providing a radius as bias.

    Parameters

    • point: Vector3

      A point.

    • bias: number

      A padding that extends the boundaries temporarily.

    Returns boolean

    Whether the given point lies inside this octant.

  • Calculates the squared distance from the center of this octant to the given point.

    Parameters

    Returns number

    The distance squared.

  • Calculates the squared distance from this octant to the given point.

    Parameters

    Returns number

    The distance squared.

  • Redistributes the points of this octant to its children.

    Has no effect if there are no points or if this octant has no children.

    Parameters

    • bias: number

      A proximity threshold.

    Returns void

Generated using TypeDoc