|
SceneGetAllHitObjects Method |
GetAllHitObjects method executes a hit testing on the SceneNodes in this Scene (or when specified on rootSceneNode and its children) and returns a list of
RayHitTestResult objects sorted from the closest to the farthest object.
When no object is hit, an empty list is returned.
Namespace: Ab4d.SharpEngineAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax public List<RayHitTestResult> GetAllHitObjects(
Ray ray,
SceneNode? rootSceneNode = null,
HitTestOptions? customHitTestOptions = null
)
Parameters
- ray Ray
- 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)
- customHitTestOptions HitTestOptions (Optional)
- Optional HitTestOptions that will be used for this hit test. When null (by default), then DefaultHitTestOptions will be used.
Return Value
ListRayHitTestResulta list of RayHitTestResult objects or an empty list when no object is hit
Remarks
GetAllHitObjects method executes a hit testing on the SceneNodes in this Scene (or when specified on rootSceneNode and its children) and returns a list of RayHitTestResult objects sorted from the closest to the farthest object.
When no triangle is hit, an empty list is returned.
To control advanced hit-testing options set the customHitTestOptions parameter (HitTestOptions) or change the DefaultHitTestOptions that is used when customHitTestOptions parameter is not set (null by default).
To get only the closest hit result, use the GetClosestHitObject(Ray, SceneNode, HitTestOptions) method.
See Also