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
Parameter
Octree parameter
OctreeBuildParameter Parameter { get; }
Property Value
TreeBuilt
Whether the tree has been built.
bool TreeBuilt { get; }
Property Value
Methods
BuildTree()
Build the static octree
void BuildTree()
CreateOctreeLineModel()
Creates the octree line model for debugging or visualize the octree
LineGeometry3D CreateOctreeLineModel()
Returns
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
contextHitTestContextThe context.
pointVector3The point.
radiusfloatThe radius.
resultList<HitTestResult>The result.
Returns
FindNearestPointBySphere(HitTestContext?, ref BoundingSphere, ref List<HitTestResult>)
bool FindNearestPointBySphere(HitTestContext? context, ref BoundingSphere sphere, ref List<HitTestResult> points)
Parameters
contextHitTestContextsphereBoundingSpherepointsList<HitTestResult>
Returns
FindNearestPointFromPoint(HitTestContext?, ref Vector3, ref List<HitTestResult>?, float)
bool FindNearestPointFromPoint(HitTestContext? context, ref Vector3 point, ref List<HitTestResult>? results, float heuristicSearchFactor = 1)
Parameters
contextHitTestContextpointVector3resultsList<HitTestResult>heuristicSearchFactorfloat
Returns
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
contextHitTestContextThe context.
modelobjectThe model.
geometryGeometry3DThe geometry.
modelMatrixMatrix4x4The model matrix.
returnsMultipleboolif set to
true[returns multiple].hitsList<HitTestResult>The hits.
Returns
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
contextHitTestContextThe context.
modelobjectThe model.
geometryGeometry3DThe geometry.
modelMatrixMatrix4x4The model matrix.
returnsMultipleboolif set to
true[returns multiple].hitsList<HitTestResult>The hits.
hitThicknessfloatThe hit thickness.
Returns
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
contextHitTestContextmodelobjectgeometryGeometry3DmodelMatrixMatrix4x4hitsList<HitTestResult>
Returns
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
contextHitTestContextmodelobjectgeometryGeometry3DmodelMatrixMatrix4x4hitsList<HitTestResult>hitThicknessfloat
Returns
Events
Hit
event EventHandler<EventArgs> Hit