![]() | |
Scene |
public void GetAllHitObjects( List<RayHitTestResult> allHitResults, Ray ray, HitTestOptions? customHitTestOptions = null )
GetAllHitObjects method executes a hit testing from the specified Ray on the SceneNodes that are shown by this SceneView and adds the hit objects to the specified allHitResults (as List{RayHitTestResult}). Hit objects are added in order from the closest to the farthest object.
This method takes a Ray as a parameter. The ray can be created by the GetRayFromCamera(Single, Single, Boolean) or GetRayFromNearPlane(Single, Single, Boolean) methods. You can also use the GetAllHitObjects(Single, Single, Boolean, HitTestOptions) method that takes mouse coordinates instead of a Ray.
To control advanced hit-testing options set the customHitTestOptions parameter (HitTestOptions) or change the Scene.DefaultHitTestOptions that is used when customHitTestOptions parameter is not set (null by default).
To get only the closest hit result, use the GetClosestHitObject(Single, Single, Boolean, HitTestOptions) or GetClosestHitObject(Ray, HitTestOptions) methods.