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
boundBoundingBoxobjListList<SceneNode>parentIDynamicOctreeparamterOctreeBuildParameterqueueCacheStack<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
objListList<SceneNode>paramterOctreeBuildParameterqueueCacheStack<KeyValuePair<int, IDynamicOctree[]>>
BoundableNodeOctree(List<SceneNode>?, Stack<KeyValuePair<int, IDynamicOctree[]>>?)
public BoundableNodeOctree(List<SceneNode>? objList, Stack<KeyValuePair<int, IDynamicOctree[]>>? queueCache = null)
Parameters
objListList<SceneNode>queueCacheStack<KeyValuePair<int, IDynamicOctree[]>>
Methods
Add(SceneNode, out IDynamicOctree?)
public override bool Add(SceneNode item, out IDynamicOctree? octant)
Parameters
itemSceneNodeoctantIDynamicOctree
Returns
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
boundBoundingBoxobjListList<SceneNode>parentIDynamicOctree
Returns
Expand(ref Vector3)
Return new root
public override IDynamicOctree? Expand(ref Vector3 direction)
Parameters
directionVector3
Returns
FindItemByGuid(Guid, SceneNode, out int)
public IDynamicOctree? FindItemByGuid(Guid guid, SceneNode item, out int index)
Parameters
Returns
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
contextHitTestContextsphereBoundingSpherepointsList<HitTestResult>isIntersectbool
Returns
GetBoundingBoxFromItem(SceneNode)
protected override BoundingBox GetBoundingBoxFromItem(SceneNode item)
Parameters
itemSceneNode
Returns
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
contextHitTestContextmodelobjectgeometryGeometry3DmodelMatrixMatrix4x4rayModelRayhitsList<HitTestResult>isIntersectboolhitThicknessfloat
Returns
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
indexintoctantIDynamicOctree
Returns
RemoveAt(int)
public override bool RemoveAt(int index)
Parameters
indexint
Returns
RemoveAt(int, IDynamicOctree)
public bool RemoveAt(int index, IDynamicOctree root)
Parameters
indexintrootIDynamicOctree
Returns
RemoveByBound(SceneNode, ref BoundingBox)
public override bool RemoveByBound(SceneNode item, ref BoundingBox bound)
Parameters
itemSceneNodeboundBoundingBox
Returns
RemoveByBound(SceneNode, ref BoundingBox, IDynamicOctree)
public bool RemoveByBound(SceneNode item, ref BoundingBox bound, IDynamicOctree root)
Parameters
itemSceneNodeboundBoundingBoxrootIDynamicOctree
Returns
RemoveByGuid(Guid, SceneNode)
public bool RemoveByGuid(Guid guid, SceneNode item)
Parameters
Returns
RemoveByGuid(Guid, SceneNode, BoundableNodeOctree?)
public bool RemoveByGuid(Guid guid, SceneNode item, BoundableNodeOctree? root)
Parameters
guidGuiditemSceneNoderootBoundableNodeOctree
Returns
RemoveSafe(SceneNode)
public override bool RemoveSafe(SceneNode item)
Parameters
itemSceneNode
Returns
RemoveSafe(SceneNode, IDynamicOctree)
public bool RemoveSafe(SceneNode item, IDynamicOctree root)
Parameters
itemSceneNoderootIDynamicOctree
Returns
Shrink()
Shrink the root bound to contains all items inside, return new root
public override IDynamicOctree? Shrink()