Table of Contents

Interface IDynamicOctree

Namespace
HelixToolkit.SharpDX
Assembly
HelixToolkit.SharpDX.dll

Interface for dynamic octree

public interface IDynamicOctree : IOctreeBasic
Inherited Members
Extension Methods

Properties

ActiveNodes

This is a bitmask indicating which child nodes are actively being used. It adds slightly more complexity, but is faster for performance since there is only one comparison instead of 8.

byte ActiveNodes { get; set; }

Property Value

byte

AutoDeleteIfEmpty

Delete self if is empty;

bool AutoDeleteIfEmpty { get; set; }

Property Value

bool

ChildNodes

Child octants

IDynamicOctree?[] ChildNodes { get; }

Property Value

IDynamicOctree[]

HasChildren

Has child octants

bool HasChildren { get; }

Property Value

bool

IsEmpty

Returns true if this node tree and all children have no content

bool IsEmpty { get; }

Property Value

bool

IsRoot

If this node is root node

bool IsRoot { get; }

Property Value

bool

Octants

Octant bounds

BoundingBox[]? Octants { get; }

Property Value

BoundingBox[]

Parent

Parent node

IDynamicOctree? Parent { get; set; }

Property Value

IDynamicOctree

SelfArray

Gets the self as array.

IDynamicOctree?[] SelfArray { get; }

Property Value

IDynamicOctree[]

The self array.

Methods

BuildCurretNodeOnly()

Build current node level only, this will only build current node and create children, but not build its children. To build from top to bottom, call BuildTree

void BuildCurretNodeOnly()

Clear()

Clear the tree

void Clear()

FindNearestPointBySphereExcludeChild(HitTestContext?, ref BoundingSphere, ref List<HitTestResult>, ref bool)

Search nearest point by a search sphere at this node only

bool FindNearestPointBySphereExcludeChild(HitTestContext? context, ref BoundingSphere sphere, ref List<HitTestResult> result, ref bool isIntersect)

Parameters

context HitTestContext
sphere BoundingSphere
result List<HitTestResult>
isIntersect bool

Returns

bool

HitTestCurrentNodeExcludeChild(HitTestContext?, object?, Geometry3D?, Matrix4x4, ref Ray, ref List<HitTestResult>, ref bool, float)

Hit test for only this node, not its child node

bool HitTestCurrentNodeExcludeChild(HitTestContext? context, object? model, Geometry3D? geometry, Matrix4x4 modelMatrix, ref Ray rayModel, ref List<HitTestResult> hits, ref bool isIntersect, float hitThickness)

Parameters

context HitTestContext
model object
geometry Geometry3D
modelMatrix Matrix4x4
rayModel Ray
hits List<HitTestResult>
isIntersect bool
hitThickness float

Only used for point/line hit test

Returns

bool

RemoveChild(IDynamicOctree)

Remove child from ChildNodes

void RemoveChild(IDynamicOctree child)

Parameters

child IDynamicOctree

RemoveSelf()

Remove self from parent node

void RemoveSelf()