Table of Contents

Class InstancingModel3DOctree

Namespace
HelixToolkit.SharpDX
Assembly
HelixToolkit.SharpDX.dll

Octree for instancing

[Obsolete("Please use StaticInstancingOctree for better performance")]
public class InstancingModel3DOctree : DynamicOctreeBase<KeyValuePair<int, BoundingBox>>, IDynamicOctree, IOctreeBasic
Inheritance
InstancingModel3DOctree
Implements
Inherited Members
Extension Methods

Constructors

InstancingModel3DOctree(ref BoundingBox, IList<Matrix4x4>, List<KeyValuePair<int, BoundingBox>>?, IDynamicOctree?, OctreeBuildParameter?, Stack<KeyValuePair<int, IDynamicOctree[]>>?)

protected InstancingModel3DOctree(ref BoundingBox bound, IList<Matrix4x4> instanceMatrix, List<KeyValuePair<int, BoundingBox>>? objects, IDynamicOctree? parent, OctreeBuildParameter? parameter, Stack<KeyValuePair<int, IDynamicOctree[]>>? stackCache = null)

Parameters

bound BoundingBox
instanceMatrix IList<Matrix4x4>
objects List<KeyValuePair<int, BoundingBox>>
parent IDynamicOctree
parameter OctreeBuildParameter
stackCache Stack<KeyValuePair<int, IDynamicOctree[]>>

InstancingModel3DOctree(IList<Matrix4x4>, BoundingBox, OctreeBuildParameter?, Stack<KeyValuePair<int, IDynamicOctree[]>>?)

public InstancingModel3DOctree(IList<Matrix4x4> instanceMatrix, BoundingBox geometryBound, OctreeBuildParameter? parameter, Stack<KeyValuePair<int, IDynamicOctree[]>>? stackCache = null)

Parameters

instanceMatrix IList<Matrix4x4>
geometryBound BoundingBox
parameter OctreeBuildParameter
stackCache Stack<KeyValuePair<int, IDynamicOctree[]>>

Methods

CreateNodeWithParent(ref BoundingBox, List<KeyValuePair<int, BoundingBox>>, IDynamicOctree)

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

Parameters

bound BoundingBox
objList List<KeyValuePair<int, BoundingBox>>
parent IDynamicOctree

Returns

IDynamicOctree

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

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(KeyValuePair<int, BoundingBox>)

protected override BoundingBox GetBoundingBoxFromItem(KeyValuePair<int, BoundingBox> item)

Parameters

item KeyValuePair<int, BoundingBox>

Returns

BoundingBox

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

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