class TSpatialTree::NodeBounds

Contains bounds for a specific node.

This is necessary since the nodes themselves do not store bounds information. Instead we construct it on-the-fly as we traverse the tree, using this class.

Public

Constructors

NodeBounds

NodeBounds() = default

NodeBounds

NodeBounds(const SIMDBoundsType &bounds)

Initializes a new bounds object using the provided node bounds.

Methods

GetBounds

const SIMDBoundsType &GetBounds() const

Returns the bounds of the node this object represents.

FindContainingChild

TSpatialTreeChildNodeId<Dimension> FindContainingChild(const SIMDBoundsType &bounds) const

Attempts to find a child node that can fully contain the provided bounds.

FindIntersectingChildren

TSpatialTreeChildNodeIdRange<Dimension> FindIntersectingChildren(const SIMDBoundsType &bounds) const

Returns a range of child nodes that intersect the provided bounds.

GetChild

NodeBounds GetChild(TSpatialTreeChildNodeId<Dimension> child) const

Calculates bounds for the provided child node.

Private

Fields

mBounds

SIMDBoundsType mBounds

mChildExtent

float mChildExtent

mChildOffset

float mChildOffset