Use update object size in CalculateActorScreenPosition
[platform/core/uifw/dali-core.git] / dali / internal / event / events / hit-test-algorithm-impl.cpp
1 /*
2  * Copyright (c) 2022 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali/internal/event/events/hit-test-algorithm-impl.h>
20
21 // INTERNAL INCLUDES
22 #include <dali/integration-api/debug.h>
23 #include <dali/internal/event/actors/actor-impl.h>
24 #include <dali/internal/event/actors/camera-actor-impl.h>
25 #include <dali/internal/event/actors/layer-impl.h>
26 #include <dali/internal/event/actors/layer-list.h>
27 #include <dali/internal/event/common/projection.h>
28 #include <dali/internal/event/events/ray-test.h>
29 #include <dali/internal/event/render-tasks/render-task-impl.h>
30 #include <dali/internal/event/render-tasks/render-task-list-impl.h>
31 #include <dali/internal/event/rendering/renderer-impl.h>
32 #include <dali/public-api/actors/layer.h>
33 #include <dali/public-api/math/vector2.h>
34 #include <dali/public-api/math/vector4.h>
35
36 namespace Dali
37 {
38 namespace Internal
39 {
40 namespace HitTestAlgorithm
41 {
42 namespace
43 {
44 struct HitActor
45 {
46   HitActor()
47   : actor(nullptr),
48     distance(std::numeric_limits<float>::max()),
49     depth(std::numeric_limits<int>::min())
50   {
51   }
52
53   Actor*  actor;       ///< The actor hit (if actor is hit, then this is initialised).
54   Vector2 hitPosition; ///< Position of hit (only valid if actor valid).
55   float   distance;    ///< Distance from ray origin to hit actor.
56   int32_t depth;       ///< Depth index of this actor.
57 };
58
59 /**
60  * Creates an Actor handle so that a HitTestFunction provided via the public API can be called.
61  */
62 struct HitTestFunctionWrapper : public HitTestInterface
63 {
64   /**
65    * Constructor
66    *
67    * @param[in] func HitTestFunction to call with an Actor handle.
68    */
69   HitTestFunctionWrapper(Dali::HitTestAlgorithm::HitTestFunction func)
70   : mFunc(func)
71   {
72   }
73
74   bool IsActorHittable(Actor* actor) override
75   {
76     return mFunc(Dali::Actor(actor), Dali::HitTestAlgorithm::CHECK_ACTOR);
77   }
78
79   bool DescendActorHierarchy(Actor* actor) override
80   {
81     return mFunc(Dali::Actor(actor), Dali::HitTestAlgorithm::DESCEND_ACTOR_TREE);
82   }
83
84   bool DoesLayerConsumeHit(Layer* layer) override
85   {
86     // Layer::IsTouchConsumed() focuses on touch only. Here we are a wrapper for the public-api
87     // where the caller may want to check for something completely different.
88     // TODO: Should provide a means to let caller decide. For now do not allow layers to consume
89     return false;
90   }
91
92   bool ActorRequiresHitResultCheck(Actor* actor, Integration::Point point, Vector2 hitPointLocal, uint32_t timeStamp) override
93   {
94     return actor->EmitHitTestResultSignal(point, hitPointLocal, timeStamp);
95   }
96
97   Dali::HitTestAlgorithm::HitTestFunction mFunc;
98 };
99
100 /**
101  * Used in the hit-test algorithm to check whether the actor is touchable.
102  * It is used by the touch event processor.
103  */
104 struct ActorTouchableCheck : public HitTestInterface
105 {
106   bool IsActorHittable(Actor* actor) override
107   {
108     return (actor->GetTouchRequired() || actor->GetInterceptTouchRequired() || actor->IsTouchFocusable()) && // Does the Application or derived actor type require a touch event or a intercept touch event? or focusable by touch?
109            actor->IsHittable();                                                                              // Is actor sensitive, visible and on the scene?
110   }
111
112   bool DescendActorHierarchy(Actor* actor) override
113   {
114     return actor->IsVisible() && // Actor is visible, if not visible then none of its children are visible.
115            actor->IsSensitive(); // Actor is sensitive, if insensitive none of its children should be hittable either.
116   }
117
118   bool DoesLayerConsumeHit(Layer* layer) override
119   {
120     return layer->IsTouchConsumed();
121   }
122
123   bool ActorRequiresHitResultCheck(Actor* actor, Integration::Point point, Vector2 hitPointLocal, uint32_t timeStamp) override
124   {
125     return actor->EmitHitTestResultSignal(point, hitPointLocal, timeStamp);
126   }
127 };
128
129 /**
130  * Check to see if the actor we're about to hit test is exclusively owned by another rendertask?
131  */
132 bool IsActorExclusiveToAnotherRenderTask(const Actor&                               actor,
133                                          const RenderTask&                          renderTask,
134                                          const RenderTaskList::ExclusivesContainer& exclusives)
135
136 {
137   if(exclusives.size())
138   {
139     for(const auto& exclusive : exclusives)
140     {
141       if((exclusive.renderTaskPtr != &renderTask) && (exclusive.actor.GetActor() == &actor))
142       {
143         return true;
144       }
145     }
146   }
147   return false;
148 }
149
150 /**
151  * Recursively hit test all the actors, without crossing into other layers.
152  * This algorithm performs a Depth-First-Search (DFS) on all Actors within Layer.
153  * Hit-Testing each Actor, noting the distance from the Ray-Origin (3D origin
154  * of touch vector). The closest Hit-Tested Actor is that which is returned.
155  * Exceptions to this rule are:
156  * - When comparing against renderable parents, if Actor is the same distance
157  * or closer than it's renderable parent, then it takes priority.
158  */
159 HitActor HitTestWithinLayer(Actor&                                     actor,
160                             const RenderTask&                          renderTask,
161                             const RenderTaskList::ExclusivesContainer& exclusives,
162                             const Vector4&                             rayOrigin,
163                             const Vector4&                             rayDir,
164                             const float&                               nearClippingPlane,
165                             const float&                               farClippingPlane,
166                             HitTestInterface&                          hitCheck,
167                             const bool&                                overlayed,
168                             bool&                                      overlayHit,
169                             bool                                       layerIs3d,
170                             uint32_t                                   clippingDepth,
171                             uint32_t                                   clippingBitPlaneMask,
172                             const RayTest&                             rayTest,
173                             const Integration::Point&                  point,
174                             const uint32_t                             eventTime)
175 {
176   HitActor hit;
177
178   if(IsActorExclusiveToAnotherRenderTask(actor, renderTask, exclusives))
179   {
180     return hit;
181   }
182
183   // For clipping, regardless of whether we have hit this actor or not,
184   // we increase the clipping depth if we have hit a clipping actor.
185   // This is used later to ensure all nested clipped children have hit
186   // all clipping actors also for them to be counted as hit.
187   uint32_t newClippingDepth = clippingDepth;
188   bool     clippingActor    = actor.GetClippingMode() != ClippingMode::DISABLED;
189   bool     overlayedActor   = overlayed || actor.IsOverlay();
190   if(clippingActor)
191   {
192     ++newClippingDepth;
193   }
194
195   // If we are a clipping actor or hittable...
196   if(clippingActor || hitCheck.IsActorHittable(&actor))
197   {
198     Vector3 size(actor.GetCurrentSize());
199
200     // Ensure the actor has a valid size.
201     // If so, perform a quick ray sphere test to see if our ray is close to the actor.
202     if(size.x > 0.0f && size.y > 0.0f && rayTest.SphereTest(actor, rayOrigin, rayDir))
203     {
204       Vector2 hitPointLocal;
205       float   distance;
206
207       // Finally, perform a more accurate ray test to see if our ray actually hits the actor.
208       if(rayTest.ActorTest(actor, rayOrigin, rayDir, hitPointLocal, distance))
209       {
210         // Calculate z coordinate value in Camera Space.
211         const Matrix&  viewMatrix          = renderTask.GetCameraActor()->GetViewMatrix();
212         const Vector4& hitDir              = Vector4(rayDir.x * distance, rayDir.y * distance, rayDir.z * distance, 0.0f);
213         const float    cameraDepthDistance = (viewMatrix * hitDir).z;
214
215         // Check if cameraDepthDistance is between clipping plane
216         if(cameraDepthDistance >= nearClippingPlane && cameraDepthDistance <= farClippingPlane)
217         {
218           // If the hit has happened on a clipping actor, then add this clipping depth to the mask of hit clipping depths.
219           // This mask shows all the actors that have been hit at different clipping depths.
220           if(clippingActor)
221           {
222             clippingBitPlaneMask |= 1u << clippingDepth;
223           }
224
225           if(overlayHit && !overlayedActor)
226           {
227             // If we have already hit an overlay and current actor is not an overlay ignore current actor.
228           }
229           else
230           {
231             if(overlayedActor)
232             {
233               overlayHit = true;
234             }
235
236             // At this point we have hit an actor.
237             // Now perform checks for clipping.
238             // Assume we have hit the actor first as if it is not clipped this would be the case.
239             bool haveHitActor = true;
240
241             // Check if we are performing clipping. IE. if any actors so far have clipping enabled - not necessarily this one.
242             // We can do this by checking the clipping depth has a value 1 or above.
243             if(newClippingDepth >= 1u)
244             {
245               // Now for us to count this actor as hit, we must have also hit
246               // all CLIPPING actors up to this point in the hierarchy as well.
247               // This information is stored in the clippingBitPlaneMask we updated above.
248               // Here we calculate a comparison mask by setting all the bits up to the current depth value.
249               // EG. a depth of 4 (10000 binary) = a mask of 1111 binary.
250               // This allows us a fast way of comparing all bits are set up to this depth.
251               // Note: If the current Actor has clipping, that is included in the depth mask too.
252               uint32_t clippingDepthMask = (1u << newClippingDepth) - 1u;
253
254               // The two masks must be equal to be a hit, as we are already assuming a hit
255               // (for non-clipping mode) then they must be not-equal to disqualify the hit.
256               if(clippingBitPlaneMask != clippingDepthMask)
257               {
258                 haveHitActor = false;
259               }
260             }
261
262             // If the hit actor does not want to hit, the hit-test continues.
263             if(haveHitActor && hitCheck.ActorRequiresHitResultCheck(&actor, point, hitPointLocal, eventTime))
264             {
265               hit.actor       = &actor;
266               hit.hitPosition = hitPointLocal;
267               hit.distance    = distance;
268               hit.depth       = actor.GetSortingDepth();
269
270               if(actor.GetRendererCount() > 0)
271               {
272                 //Get renderer with maximum depth
273                 int rendererMaxDepth(actor.GetRendererAt(0).Get()->GetDepthIndex());
274                 for(uint32_t i(1); i < actor.GetRendererCount(); ++i)
275                 {
276                   int depth = actor.GetRendererAt(i).Get()->GetDepthIndex();
277                   if(depth > rendererMaxDepth)
278                   {
279                     rendererMaxDepth = depth;
280                   }
281                 }
282                 hit.depth += rendererMaxDepth;
283               }
284             }
285           }
286         }
287       }
288     }
289   }
290
291   // Find a child hit, until we run out of actors in the current layer.
292   HitActor childHit;
293   if(actor.GetChildCount() > 0)
294   {
295     childHit.distance        = std::numeric_limits<float>::max();
296     childHit.depth           = std::numeric_limits<int32_t>::min();
297     ActorContainer& children = actor.GetChildrenInternal();
298
299     // Hit test ALL children and calculate their distance.
300     bool parentIsRenderable = actor.IsRenderable();
301
302     for(ActorIter iter = children.begin(), endIter = children.end(); iter != endIter; ++iter)
303     {
304       // Descend tree only if...
305       if(!(*iter)->IsLayer() &&                           // Child is NOT a layer, hit testing current layer only
306          (hitCheck.DescendActorHierarchy((*iter).Get()))) // We can descend into child hierarchy
307       {
308         HitActor currentHit(HitTestWithinLayer((*iter->Get()),
309                                                renderTask,
310                                                exclusives,
311                                                rayOrigin,
312                                                rayDir,
313                                                nearClippingPlane,
314                                                farClippingPlane,
315                                                hitCheck,
316                                                overlayedActor,
317                                                overlayHit,
318                                                layerIs3d,
319                                                newClippingDepth,
320                                                clippingBitPlaneMask,
321                                                rayTest,
322                                                point,
323                                                eventTime));
324
325         // Make sure the set hit actor is actually hittable. This is usually required when we have some
326         // clipping as we need to hit-test all actors as we descend the tree regardless of whether they
327         // are hittable or not.
328         if(currentHit.actor && (!hitCheck.IsActorHittable(currentHit.actor)))
329         {
330           continue;
331         }
332
333         bool updateChildHit = false;
334         if(currentHit.distance >= 0.0f)
335         {
336           if(layerIs3d)
337           {
338             updateChildHit = ((currentHit.depth > childHit.depth) ||
339                               ((currentHit.depth == childHit.depth) && (currentHit.distance < childHit.distance)));
340           }
341           else
342           {
343             updateChildHit = currentHit.depth >= childHit.depth;
344           }
345         }
346
347         if(updateChildHit)
348         {
349           if(!parentIsRenderable || currentHit.depth > hit.depth ||
350              (layerIs3d && (currentHit.depth == hit.depth && currentHit.distance < hit.distance)))
351           {
352             childHit = currentHit;
353           }
354         }
355       }
356     }
357   }
358
359   return (childHit.actor) ? childHit : hit;
360 }
361
362 /**
363  * Return true if actor is sourceActor or a descendent of sourceActor
364  */
365 bool IsWithinSourceActors(const Actor& sourceActor, const Actor& actor)
366 {
367   if(&sourceActor == &actor)
368   {
369     return true;
370   }
371
372   Actor* parent = actor.GetParent();
373   if(parent)
374   {
375     return IsWithinSourceActors(sourceActor, *parent);
376   }
377
378   // Not within source actors
379   return false;
380 }
381
382 /**
383  * Returns true if the layer and all of the layer's parents are visible and sensitive.
384  */
385 inline bool IsActuallyHittable(Layer& layer, const Vector2& screenCoordinates, const Vector2& stageSize, HitTestInterface& hitCheck)
386 {
387   bool hittable(true);
388
389   if(layer.IsClipping())
390   {
391     ClippingBox box = layer.GetClippingBox();
392
393     if(screenCoordinates.x < static_cast<float>(box.x) ||
394        screenCoordinates.x > static_cast<float>(box.x + box.width) ||
395        screenCoordinates.y < stageSize.y - static_cast<float>(box.y + box.height) ||
396        screenCoordinates.y > stageSize.y - static_cast<float>(box.y))
397     {
398       // Not touchable if clipping is enabled in the layer and the screen coordinate is outside the clip region.
399       hittable = false;
400     }
401   }
402
403   if(hittable)
404   {
405     Actor* actor(&layer);
406
407     // Ensure that we can descend into the layer's (or any of its parent's) hierarchy.
408     while(actor && hittable)
409     {
410       if(!hitCheck.DescendActorHierarchy(actor))
411       {
412         hittable = false;
413         break;
414       }
415       actor = actor->GetParent();
416     }
417   }
418
419   return hittable;
420 }
421
422 /**
423  * Gets the near and far clipping planes of the camera from which the scene is viewed in the render task.
424  */
425 void GetCameraClippingPlane(RenderTask& renderTask, float& nearClippingPlane, float& farClippingPlane)
426 {
427   CameraActor* cameraActor = renderTask.GetCameraActor();
428   nearClippingPlane        = cameraActor->GetNearClippingPlane();
429   farClippingPlane         = cameraActor->GetFarClippingPlane();
430 }
431
432 /**
433  * Hit test a RenderTask
434  */
435 bool HitTestRenderTask(const RenderTaskList::ExclusivesContainer& exclusives,
436                        const Vector2&                             sceneSize,
437                        LayerList&                                 layers,
438                        RenderTask&                                renderTask,
439                        Vector2                                    screenCoordinates,
440                        Results&                                   results,
441                        HitTestInterface&                          hitCheck,
442                        const RayTest&                             rayTest)
443 {
444   if(renderTask.IsHittable(screenCoordinates))
445   {
446     Viewport viewport;
447     renderTask.GetViewport(viewport);
448     if(screenCoordinates.x < static_cast<float>(viewport.x) ||
449        screenCoordinates.x > static_cast<float>(viewport.x + viewport.width) ||
450        screenCoordinates.y < static_cast<float>(viewport.y) ||
451        screenCoordinates.y > static_cast<float>(viewport.y + viewport.height))
452     {
453       // The screen coordinate is outside the viewport of render task. The viewport clips all layers.
454       return false;
455     }
456
457     float nearClippingPlane, farClippingPlane;
458     GetCameraClippingPlane(renderTask, nearClippingPlane, farClippingPlane);
459
460     // Determine the layer depth of the source actor
461     Actor* sourceActor(renderTask.GetSourceActor());
462     if(sourceActor)
463     {
464       Dali::Layer layer(sourceActor->GetLayer());
465       if(layer)
466       {
467         const uint32_t sourceActorDepth(layer.GetProperty<bool>(Dali::Layer::Property::DEPTH));
468
469         CameraActor* cameraActor     = renderTask.GetCameraActor();
470         bool         pickingPossible = cameraActor->BuildPickingRay(
471           screenCoordinates,
472           viewport,
473           results.rayOrigin,
474           results.rayDirection);
475         if(!pickingPossible)
476         {
477           return false;
478         }
479
480         // Hit test starting with the top layer, working towards the bottom layer.
481         HitActor hit;
482         bool     overlayHit       = false;
483         bool     layerConsumesHit = false;
484
485         for(int32_t i = layers.GetLayerCount() - 1; i >= 0 && !(hit.actor); --i)
486         {
487           Layer* layer(layers.GetLayer(i));
488           overlayHit = false;
489
490           // Ensure layer is touchable (also checks whether ancestors are also touchable)
491           if(IsActuallyHittable(*layer, screenCoordinates, sceneSize, hitCheck))
492           {
493             // Always hit-test the source actor; otherwise test whether the layer is below the source actor in the hierarchy
494             if(sourceActorDepth == static_cast<uint32_t>(i))
495             {
496               // Recursively hit test the source actor & children, without crossing into other layers.
497               hit = HitTestWithinLayer(*sourceActor,
498                                        renderTask,
499                                        exclusives,
500                                        results.rayOrigin,
501                                        results.rayDirection,
502                                        nearClippingPlane,
503                                        farClippingPlane,
504                                        hitCheck,
505                                        overlayHit,
506                                        overlayHit,
507                                        layer->GetBehavior() == Dali::Layer::LAYER_3D,
508                                        0u,
509                                        0u,
510                                        rayTest,
511                                        results.point,
512                                        results.eventTime);
513             }
514             else if(IsWithinSourceActors(*sourceActor, *layer))
515             {
516               // Recursively hit test all the actors, without crossing into other layers.
517               hit = HitTestWithinLayer(*layer,
518                                        renderTask,
519                                        exclusives,
520                                        results.rayOrigin,
521                                        results.rayDirection,
522                                        nearClippingPlane,
523                                        farClippingPlane,
524                                        hitCheck,
525                                        overlayHit,
526                                        overlayHit,
527                                        layer->GetBehavior() == Dali::Layer::LAYER_3D,
528                                        0u,
529                                        0u,
530                                        rayTest,
531                                        results.point,
532                                        results.eventTime);
533             }
534
535             // If this layer is set to consume the hit, then do not check any layers behind it
536             if(hitCheck.DoesLayerConsumeHit(layer))
537             {
538               layerConsumesHit = true;
539               break;
540             }
541           }
542         }
543
544         if(hit.actor)
545         {
546           results.renderTask       = RenderTaskPtr(&renderTask);
547           results.actor            = Dali::Actor(hit.actor);
548           results.actorCoordinates = hit.hitPosition;
549
550           return true; // Success
551         }
552
553         if(layerConsumesHit)
554         {
555           return true; // Also success if layer is consuming the hit
556         }
557       }
558     }
559   }
560   return false;
561 }
562
563 /**
564  * Iterate through the RenderTaskList and perform hit testing.
565  *
566  * @param[in] sceneSize The scene size the tests will be performed in
567  * @param[in] layers The list of layers to test
568  * @param[in] taskList The list of render tasks
569  * @param[out] results Ray information calculated by the camera
570  * @param[in] hitCheck The hit testing interface object to use
571  * @param[in] onScreen True to test on-screen, false to test off-screen
572  * @return True if we have a hit, false otherwise
573  */
574 bool HitTestRenderTaskList(const Vector2&    sceneSize,
575                            LayerList&        layers,
576                            RenderTaskList&   taskList,
577                            const Vector2&    screenCoordinates,
578                            Results&          results,
579                            HitTestInterface& hitCheck,
580                            bool              onScreen)
581 {
582   RenderTaskList::RenderTaskContainer&                  tasks      = taskList.GetTasks();
583   RenderTaskList::RenderTaskContainer::reverse_iterator endIter    = tasks.rend();
584   const auto&                                           exclusives = taskList.GetExclusivesList();
585   RayTest                                               rayTest;
586
587   for(RenderTaskList::RenderTaskContainer::reverse_iterator iter = tasks.rbegin(); endIter != iter; ++iter)
588   {
589     RenderTask& renderTask            = *iter->Get();
590     const bool  isOffscreenRenderTask = renderTask.GetFrameBuffer();
591     if((onScreen && isOffscreenRenderTask) || (!onScreen && !isOffscreenRenderTask))
592     {
593       // Skip to next task
594       continue;
595     }
596     if(HitTestRenderTask(exclusives, sceneSize, layers, renderTask, screenCoordinates, results, hitCheck, rayTest))
597     {
598       // Return true when an actor is hit (or layer in our render-task consumes the hit)
599       return true; // don't bother checking off screen tasks
600     }
601   }
602
603   return false;
604 }
605
606 /**
607  * Iterate through the RenderTaskList and perform hit testing for both on-screen and off-screen.
608  *
609  * @param[in] sceneSize The scene size the tests will be performed in
610  * @param[in] layers The list of layers to test
611  * @param[in] taskList The list of render tasks
612  * @param[out] results Ray information calculated by the camera
613  * @param[in] hitCheck The hit testing interface object to use
614  * @param[in] onScreen True to test on-screen, false to test off-screen
615  * @return True if we have a hit, false otherwise
616  */
617 bool HitTestForEachRenderTask(const Vector2&    sceneSize,
618                               LayerList&        layers,
619                               RenderTaskList&   taskList,
620                               const Vector2&    screenCoordinates,
621                               Results&          results,
622                               HitTestInterface& hitCheck)
623 {
624   bool result = false;
625
626   // Check on-screen tasks before off-screen ones.
627   // Hit test order should be reverse of draw order (see ProcessRenderTasks() where off-screen tasks are drawn first).
628   if(HitTestRenderTaskList(sceneSize, layers, taskList, screenCoordinates, results, hitCheck, true) ||
629      HitTestRenderTaskList(sceneSize, layers, taskList, screenCoordinates, results, hitCheck, false))
630   {
631     // Found hit.
632     result = true;
633   }
634
635   return result;
636 }
637
638 } // unnamed namespace
639
640 HitTestInterface::~HitTestInterface() = default;
641
642 bool HitTest(const Vector2& sceneSize, RenderTaskList& taskList, LayerList& layerList, const Vector2& screenCoordinates, Dali::HitTestAlgorithm::Results& results, Dali::HitTestAlgorithm::HitTestFunction func)
643 {
644   bool wasHit(false);
645   // Hit-test the regular on-scene actors
646   Results                hitTestResults;
647   HitTestFunctionWrapper hitTestFunctionWrapper(func);
648   if(HitTestForEachRenderTask(sceneSize, layerList, taskList, screenCoordinates, hitTestResults, hitTestFunctionWrapper))
649   {
650     results.actor            = hitTestResults.actor;
651     results.actorCoordinates = hitTestResults.actorCoordinates;
652     wasHit                   = true;
653   }
654   return wasHit;
655 }
656
657 bool HitTest(const Vector2& sceneSize, RenderTaskList& renderTaskList, LayerList& layerList, const Vector2& screenCoordinates, Results& results, HitTestInterface& hitTestInterface)
658 {
659   bool wasHit(false);
660
661   // Hit-test the regular on-scene actors
662   if(!wasHit)
663   {
664     wasHit = HitTestForEachRenderTask(sceneSize, layerList, renderTaskList, screenCoordinates, results, hitTestInterface);
665   }
666   return wasHit;
667 }
668
669 bool HitTest(const Vector2& sceneSize, RenderTaskList& renderTaskList, LayerList& layerList, const Vector2& screenCoordinates, Results& results)
670 {
671   ActorTouchableCheck actorTouchableCheck;
672   return HitTest(sceneSize, renderTaskList, layerList, screenCoordinates, results, actorTouchableCheck);
673 }
674
675 } // namespace HitTestAlgorithm
676
677 } // namespace Internal
678
679 } // namespace Dali