Table of Contents

Class PointGeometryOctree

Namespace
HelixToolkit.SharpDX
Assembly
HelixToolkit.SharpDX.dll

Octree for points

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

Constructors

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

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

Parameters

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

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

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

Parameters

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

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

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

Parameters

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

Methods

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

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

Parameters

bound BoundingBox
objList List<int>
parent IDynamicOctree

Returns

IDynamicOctree

DistanceRayToPoint(ref Ray, ref Vector3)

Get the distance from ray to a point

public static double DistanceRayToPoint(ref Ray r, ref Vector3 p)

Parameters

r Ray
p Vector3

Returns

double

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(int)

protected override BoundingBox GetBoundingBoxFromItem(int item)

Parameters

item int

Returns

BoundingBox

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

Return nearest point it gets hit. And the distance from ray origin to the point it gets hit

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

IsContains(BoundingBox, BoundingBox, int)

protected override bool IsContains(BoundingBox source, BoundingBox target, int obj)

Parameters

source BoundingBox
target BoundingBox
obj int

Returns

bool