Click or drag to resize
AB4D logo

DXSceneGetAllHitObjects Method

GetAllHitObjects method executes a hit testing on the SceneNodes in this DXScene (or when specified on rootSceneNode and its children) 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
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.0.8865.1045
Syntax
C#
public List<DXRayHitTestResult> GetAllHitObjects(
	Ray ray,
	SceneNode rootSceneNode = null
)

Parameters

ray  Ray
SharpDX.Ray object that defines the ray that is used for hit testing
rootSceneNode  SceneNode  (Optional)
SceneNode where the hit testing begins and continues to SceneNode's children. When not set or null, then DXScene.RootNode is used (optional)

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 (or when specified on rootSceneNode and its children) 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(Ray, SceneNode) method.

See Also