Table of Contents

Struct SwiftBVHNode<TKey, TVolume>

Namespace
SwiftCollections.Query
Assembly
SwiftCollections.dll

Represents a node in a Bounding Volume Hierarchy (BVH). Stores spatial data and maintains hierarchical relationships.

public struct SwiftBVHNode<TKey, TVolume> where TVolume : struct, IBoundVolume<TVolume>

Type Parameters

TKey
TVolume
Inherited Members

Properties

Bounds

Gets or sets the bounding volume of the node.

public TVolume Bounds { readonly get; set; }

Property Value

TVolume

Default

Provides a custom default instance of SwiftBVHNode<TKey, TVolume>.

public static SwiftBVHNode<TKey, TVolume> Default { get; }

Property Value

SwiftBVHNode<TKey, TVolume>

HasChildren

Determines if the node has any children.

public readonly bool HasChildren { get; }

Property Value

bool

HasLeftChild

Determines if the node has a left child.

public readonly bool HasLeftChild { get; }

Property Value

bool

HasParent

Determines if the node has a parent.

public readonly bool HasParent { get; }

Property Value

bool

HasRightChild

Determines if the node has a right child.

public readonly bool HasRightChild { get; }

Property Value

bool

IsAllocated

Determines whether or not this node has been allocated from the pool or is a pooled instance

public bool IsAllocated { readonly get; set; }

Property Value

bool

IsLeaf

Gets or sets a value indicating whether this node is a leaf node.

public bool IsLeaf { readonly get; set; }

Property Value

bool

LeftChildIndex

Gets or sets the index of the left child node.

public int LeftChildIndex { readonly get; set; }

Property Value

int

MyIndex

Gets or sets the index value associated with this instance.

public int MyIndex { readonly get; set; }

Property Value

int

ParentIndex

Gets or sets the index of the parent node.

public int ParentIndex { readonly get; set; }

Property Value

int

RightChildIndex

Gets or sets the index of the right child node.

public int RightChildIndex { readonly get; set; }

Property Value

int

SubtreeSize

Tracks the number of nodes in the subtree rooted at this node.

public int SubtreeSize { readonly get; set; }

Property Value

int

Value

Gets or sets the value stored in the node.

public TKey Value { readonly get; set; }

Property Value

TKey

Methods

Reset()

Resets the node to its default state. Clears all references and metadata.

public void Reset()