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
boundBoundingBoxpositionsIList<Vector3>listList<int>parentIDynamicOctreeparamterOctreeBuildParameterstackCacheStack<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
positionsIList<Vector3>parameterOctreeBuildParameterstackCacheStack<KeyValuePair<int, IDynamicOctree[]>>
PointGeometryOctree(IList<Vector3>?, Stack<KeyValuePair<int, IDynamicOctree[]>>?)
public PointGeometryOctree(IList<Vector3>? positions, Stack<KeyValuePair<int, IDynamicOctree[]>>? stackCache = null)
Parameters
positionsIList<Vector3>stackCacheStack<KeyValuePair<int, IDynamicOctree[]>>
Methods
CreateNodeWithParent(ref BoundingBox, List<int>?, IDynamicOctree?)
protected override IDynamicOctree CreateNodeWithParent(ref BoundingBox bound, List<int>? objList, IDynamicOctree? parent)
Parameters
boundBoundingBoxobjListList<int>parentIDynamicOctree
Returns
DistanceRayToPoint(ref Ray, ref Vector3)
Get the distance from ray to a point
public static double DistanceRayToPoint(ref Ray r, ref Vector3 p)
Parameters
Returns
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
contextHitTestContextsphereBoundingSphereresultList<HitTestResult>isIntersectbool
Returns
GetBoundingBoxFromItem(int)
protected override BoundingBox GetBoundingBoxFromItem(int item)
Parameters
itemint
Returns
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
contextHitTestContextmodelobjectgeometryGeometry3DmodelMatrixMatrix4x4rayModelRayhitsList<HitTestResult>isIntersectboolhitThicknessfloat
Returns
IsContains(BoundingBox, BoundingBox, int)
protected override bool IsContains(BoundingBox source, BoundingBox target, int obj)
Parameters
sourceBoundingBoxtargetBoundingBoxobjint