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
AutoDeleteIfEmpty
Delete self if is empty;
bool AutoDeleteIfEmpty { get; set; }
Property Value
ChildNodes
Child octants
IDynamicOctree?[] ChildNodes { get; }
Property Value
HasChildren
Has child octants
bool HasChildren { get; }
Property Value
IsEmpty
Returns true if this node tree and all children have no content
bool IsEmpty { get; }
Property Value
IsRoot
If this node is root node
bool IsRoot { get; }
Property Value
Octants
Octant bounds
BoundingBox[]? Octants { get; }
Property Value
Parent
Parent node
IDynamicOctree? Parent { get; set; }
Property Value
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
contextHitTestContextsphereBoundingSphereresultList<HitTestResult>isIntersectbool
Returns
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
contextHitTestContextmodelobjectgeometryGeometry3DmodelMatrixMatrix4x4rayModelRayhitsList<HitTestResult>isIntersectboolhitThicknessfloatOnly used for point/line hit test
Returns
RemoveChild(IDynamicOctree)
Remove child from ChildNodes
void RemoveChild(IDynamicOctree child)
Parameters
childIDynamicOctree
RemoveSelf()
Remove self from parent node
void RemoveSelf()