Table of Contents

Class MeshGeometryOctree

Namespace
HelixToolkit.SharpDX
Assembly
HelixToolkit.SharpDX.dll

MeshGeometryOctree slices mesh geometry by triangles into octree. Objects are KeyValuePair of each triangle index and its bounding box.

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

Constructors

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

protected MeshGeometryOctree(BoundingBox bound, List<KeyValuePair<int, BoundingBox>> list, IDynamicOctree parent, OctreeBuildParameter? paramter, Stack<KeyValuePair<int, IDynamicOctree[]>>? stackCache)

Parameters

bound BoundingBox
list List<KeyValuePair<int, BoundingBox>>
parent IDynamicOctree
paramter OctreeBuildParameter
stackCache Stack<KeyValuePair<int, IDynamicOctree[]>>

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

protected MeshGeometryOctree(IList<Vector3>? positions, IList<int>? indices, ref BoundingBox bound, List<KeyValuePair<int, BoundingBox>> triIndex, IDynamicOctree parent, OctreeBuildParameter? paramter, Stack<KeyValuePair<int, IDynamicOctree[]>>? stackCache)

Parameters

positions IList<Vector3>
indices IList<int>
bound BoundingBox
triIndex List<KeyValuePair<int, BoundingBox>>
parent IDynamicOctree
paramter OctreeBuildParameter
stackCache Stack<KeyValuePair<int, IDynamicOctree[]>>

MeshGeometryOctree(IList<Vector3>?, IList<int>?, OctreeBuildParameter?, Stack<KeyValuePair<int, IDynamicOctree[]>>?)

public MeshGeometryOctree(IList<Vector3>? positions, IList<int>? indices, OctreeBuildParameter? parameter, Stack<KeyValuePair<int, IDynamicOctree[]>>? stackCache = null)

Parameters

positions IList<Vector3>
indices IList<int>
parameter OctreeBuildParameter
stackCache Stack<KeyValuePair<int, IDynamicOctree[]>>

MeshGeometryOctree(IList<Vector3>, IList<int>, Stack<KeyValuePair<int, IDynamicOctree[]>>?)

public MeshGeometryOctree(IList<Vector3> positions, IList<int> indices, Stack<KeyValuePair<int, IDynamicOctree[]>>? stackCache = null)

Parameters

positions IList<Vector3>
indices IList<int>
stackCache Stack<KeyValuePair<int, IDynamicOctree[]>>

Properties

Indices

public IList<int>? Indices { get; }

Property Value

IList<int>

Positions

public IList<Vector3>? Positions { get; }

Property Value

IList<Vector3>

Methods

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

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

Parameters

region 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> result, ref bool isIntersect)

Parameters

context HitTestContext
sphere BoundingSphere
result 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