Table of Contents

Class BoundableNodeOctree

Namespace
HelixToolkit.SharpDX.Utilities
Assembly
HelixToolkit.SharpDX.dll
public class BoundableNodeOctree : DynamicOctreeBase<SceneNode>, IDynamicOctree, IOctreeBasic
Inheritance
BoundableNodeOctree
Implements
Inherited Members
Extension Methods

Constructors

BoundableNodeOctree(BoundingBox, List<SceneNode>?, IDynamicOctree?, OctreeBuildParameter?, Stack<KeyValuePair<int, IDynamicOctree[]>>?)

protected BoundableNodeOctree(BoundingBox bound, List<SceneNode>? objList, IDynamicOctree? parent, OctreeBuildParameter? paramter, Stack<KeyValuePair<int, IDynamicOctree[]>>? queueCache)

Parameters

bound BoundingBox
objList List<SceneNode>
parent IDynamicOctree
paramter OctreeBuildParameter
queueCache Stack<KeyValuePair<int, IDynamicOctree[]>>

BoundableNodeOctree(List<SceneNode>?, OctreeBuildParameter?, Stack<KeyValuePair<int, IDynamicOctree[]>>?)

public BoundableNodeOctree(List<SceneNode>? objList, OctreeBuildParameter? paramter, Stack<KeyValuePair<int, IDynamicOctree[]>>? queueCache = null)

Parameters

objList List<SceneNode>
paramter OctreeBuildParameter
queueCache Stack<KeyValuePair<int, IDynamicOctree[]>>

BoundableNodeOctree(List<SceneNode>?, Stack<KeyValuePair<int, IDynamicOctree[]>>?)

public BoundableNodeOctree(List<SceneNode>? objList, Stack<KeyValuePair<int, IDynamicOctree[]>>? queueCache = null)

Parameters

objList List<SceneNode>
queueCache Stack<KeyValuePair<int, IDynamicOctree[]>>

Methods

Add(SceneNode, out IDynamicOctree?)

public override bool Add(SceneNode item, out IDynamicOctree? octant)

Parameters

item SceneNode
octant IDynamicOctree

Returns

bool

BuildTree()

Build the octree

public override void BuildTree()

CreateNodeWithParent(ref BoundingBox, List<SceneNode>, IDynamicOctree)

protected override IDynamicOctree CreateNodeWithParent(ref BoundingBox bound, List<SceneNode> objList, IDynamicOctree parent)

Parameters

bound BoundingBox
objList List<SceneNode>
parent IDynamicOctree

Returns

IDynamicOctree

Expand(ref Vector3)

Return new root

public override IDynamicOctree? Expand(ref Vector3 direction)

Parameters

direction Vector3

Returns

IDynamicOctree

FindItemByGuid(Guid, SceneNode, out int)

public IDynamicOctree? FindItemByGuid(Guid guid, SceneNode item, out int index)

Parameters

guid Guid
item SceneNode
index int

Returns

IDynamicOctree

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

Find nearest point by sphere on current node only.

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

Parameters

context HitTestContext
sphere BoundingSphere
points List<HitTestResult>
isIntersect bool

Returns

bool

GetBoundingBoxFromItem(SceneNode)

protected override BoundingBox GetBoundingBoxFromItem(SceneNode item)

Parameters

item SceneNode

Returns

BoundingBox

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

Hit test for current node.

public override 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

Returns

bool

PushExistingToChild(int, out IDynamicOctree?)

Push one of object belongs to current node into its child octant

public override bool PushExistingToChild(int index, out IDynamicOctree? octant)

Parameters

index int
octant IDynamicOctree

Returns

bool

RemoveAt(int)

public override bool RemoveAt(int index)

Parameters

index int

Returns

bool

RemoveAt(int, IDynamicOctree)

public bool RemoveAt(int index, IDynamicOctree root)

Parameters

index int
root IDynamicOctree

Returns

bool

RemoveByBound(SceneNode, ref BoundingBox)

public override bool RemoveByBound(SceneNode item, ref BoundingBox bound)

Parameters

item SceneNode
bound BoundingBox

Returns

bool

RemoveByBound(SceneNode, ref BoundingBox, IDynamicOctree)

public bool RemoveByBound(SceneNode item, ref BoundingBox bound, IDynamicOctree root)

Parameters

item SceneNode
bound BoundingBox
root IDynamicOctree

Returns

bool

RemoveByGuid(Guid, SceneNode)

public bool RemoveByGuid(Guid guid, SceneNode item)

Parameters

guid Guid
item SceneNode

Returns

bool

RemoveByGuid(Guid, SceneNode, BoundableNodeOctree?)

public bool RemoveByGuid(Guid guid, SceneNode item, BoundableNodeOctree? root)

Parameters

guid Guid
item SceneNode
root BoundableNodeOctree

Returns

bool

RemoveSafe(SceneNode)

public override bool RemoveSafe(SceneNode item)

Parameters

item SceneNode

Returns

bool

RemoveSafe(SceneNode, IDynamicOctree)

public bool RemoveSafe(SceneNode item, IDynamicOctree root)

Parameters

item SceneNode
root IDynamicOctree

Returns

bool

Shrink()

Shrink the root bound to contains all items inside, return new root

public override IDynamicOctree? Shrink()

Returns

IDynamicOctree