Table of Contents

Interface IOctreeBoundsPartitioner<TVolume>

Namespace
SwiftCollections.Query
Assembly
SwiftCollections.dll

Maps octree subdivision and containment behavior for a specific volume backend.

public interface IOctreeBoundsPartitioner<TVolume> where TVolume : struct, IBoundVolume<TVolume>

Type Parameters

TVolume

The volume type used by the octree.

Methods

CanSubdivide(TVolume)

Determines whether the supplied node bounds can be subdivided further.

bool CanSubdivide(TVolume bounds)

Parameters

bounds TVolume

Returns

bool

ContainsBounds(TVolume, TVolume)

Determines whether inner is fully contained within outer.

bool ContainsBounds(TVolume outer, TVolume inner)

Parameters

outer TVolume
inner TVolume

Returns

bool

CreateChildBounds(TVolume, int)

Creates the child-octant bounds for the supplied parent bounds and child index.

TVolume CreateChildBounds(TVolume parentBounds, int childIndex)

Parameters

parentBounds TVolume
childIndex int

Returns

TVolume

TryGetContainingChildIndex(TVolume, TVolume, out int)

Attempts to resolve the child octant that fully contains the supplied entry bounds.

bool TryGetContainingChildIndex(TVolume nodeBounds, TVolume entryBounds, out int childIndex)

Parameters

nodeBounds TVolume
entryBounds TVolume
childIndex int

Returns

bool