Click or drag to resize
AB4D logo

DXViewportViewGetAllHitObjects Method

GetAllHitObjects method executes a hit testing on the SceneNodes in this DXScene and returns a list of DXRayHitTestResult objects sorted from the closest to the farthest object. When no object is hit, an empty list is returned.

Namespace: Ab3d.DirectX.Controls
Assembly: Ab3d.DXEngine.Wpf (in Ab3d.DXEngine.Wpf.dll) Version: 7.0.8865.1045
Syntax
C#
public List<DXRayHitTestResult> GetAllHitObjects(
	Point position
)

Parameters

position  Point
2D position in Viewport3D that is used to create a 3D ray that is used for hit testing (usually mouse position)

Return Value

ListDXRayHitTestResult
a list of DXRayHitTestResult objects or an empty list when no object is hit
Remarks

GetAllHitObjects method executes a hit testing on the SceneNodes in this DXScene and returns a list of DXRayHitTestResult objects sorted from the closest to the farthest object. When no triangle is hit, an empty list is returned.

It is possible to adjust hit testing with changing the value in the DXHitTestOptions property.

To get only the closest hit result, use the GetClosestHitObject(Point) method.

See Also