Table of Contents

Interface IOctreeBasic

Namespace
HelixToolkit.SharpDX
Assembly
HelixToolkit.SharpDX.dll

Interface for basic octree. Used to implement static octree and dynamic octree

public interface IOctreeBasic

Properties

Bound

Gets the bound.

BoundingBox Bound { get; }

Property Value

BoundingBox

The bound.

HitPathBoundingBoxes

Output the hit path of the tree traverse. Only for debugging

IList<BoundingBox> HitPathBoundingBoxes { get; }

Property Value

IList<BoundingBox>

Parameter

Octree parameter

OctreeBuildParameter Parameter { get; }

Property Value

OctreeBuildParameter

TreeBuilt

Whether the tree has been built.

bool TreeBuilt { get; }

Property Value

bool

Methods

BuildTree()

Build the static octree

void BuildTree()

CreateOctreeLineModel()

Creates the octree line model for debugging or visualize the octree

LineGeometry3D CreateOctreeLineModel()

Returns

LineGeometry3D

FindNearestPointByPointAndSearchRadius(HitTestContext?, ref Vector3, float, ref List<HitTestResult>)

Finds the nearest point by point and search radius.

bool FindNearestPointByPointAndSearchRadius(HitTestContext? context, ref Vector3 point, float radius, ref List<HitTestResult> result)

Parameters

context HitTestContext

The context.

point Vector3

The point.

radius float

The radius.

result List<HitTestResult>

The result.

Returns

bool

FindNearestPointBySphere(HitTestContext?, ref BoundingSphere, ref List<HitTestResult>)

bool FindNearestPointBySphere(HitTestContext? context, ref BoundingSphere sphere, ref List<HitTestResult> points)

Parameters

context HitTestContext
sphere BoundingSphere
points List<HitTestResult>

Returns

bool

FindNearestPointFromPoint(HitTestContext?, ref Vector3, ref List<HitTestResult>?, float)

bool FindNearestPointFromPoint(HitTestContext? context, ref Vector3 point, ref List<HitTestResult>? results, float heuristicSearchFactor = 1)

Parameters

context HitTestContext
point Vector3
results List<HitTestResult>
heuristicSearchFactor float

Returns

bool

HitTest(HitTestContext?, object?, Geometry3D?, Matrix4x4, bool, ref List<HitTestResult>)

Hits the test. Returns multiple hits if returnsMultiple = true/>

bool HitTest(HitTestContext? context, object? model, Geometry3D? geometry, Matrix4x4 modelMatrix, bool returnsMultiple, ref List<HitTestResult> hits)

Parameters

context HitTestContext

The context.

model object

The model.

geometry Geometry3D

The geometry.

modelMatrix Matrix4x4

The model matrix.

returnsMultiple bool

if set to true [returns multiple].

hits List<HitTestResult>

The hits.

Returns

bool

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

Hits the test.

bool HitTest(HitTestContext? context, object? model, Geometry3D? geometry, Matrix4x4 modelMatrix, bool returnsMultiple, ref List<HitTestResult> hits, float hitThickness)

Parameters

context HitTestContext

The context.

model object

The model.

geometry Geometry3D

The geometry.

modelMatrix Matrix4x4

The model matrix.

returnsMultiple bool

if set to true [returns multiple].

hits List<HitTestResult>

The hits.

hitThickness float

The hit thickness.

Returns

bool

HitTest(HitTestContext?, object?, Geometry3D?, Matrix4x4, ref List<HitTestResult>)

Hit test. Only returns closest hit test result

bool HitTest(HitTestContext? context, object? model, Geometry3D? geometry, Matrix4x4 modelMatrix, ref List<HitTestResult> hits)

Parameters

context HitTestContext
model object
geometry Geometry3D
modelMatrix Matrix4x4
hits List<HitTestResult>

Returns

bool

HitTest(HitTestContext?, object?, Geometry3D?, Matrix4x4, ref List<HitTestResult>, float)

bool HitTest(HitTestContext? context, object? model, Geometry3D? geometry, Matrix4x4 modelMatrix, ref List<HitTestResult> hits, float hitThickness)

Parameters

context HitTestContext
model object
geometry Geometry3D
modelMatrix Matrix4x4
hits List<HitTestResult>
hitThickness float

Returns

bool

Events

Hit

event EventHandler<EventArgs> Hit

Event Type

EventHandler<EventArgs>