Dali 3D User Interface Engine
Classes | Functions
Dali::Internal::HitTestAlgorithm::anonymous_namespace{hit-test-algorithm-impl.cpp} Namespace Reference

Classes

struct  HitActor
 
struct  HitTestFunctionWrapper
 Creates an Actor handle so that a HitTestFunction provided via the public API can be called. More...
 
struct  ActorTouchableCheck
 Used in the hit-test algorithm to check whether the actor is touchable. More...
 

Functions

bool IsActorExclusiveToAnotherRenderTask (const Actor &actor, const RenderTask &renderTask, const Vector< RenderTaskList::Exclusive > &exclusives)
 Check to see if the actor we're about to hit test is exclusively owned by another rendertask? More...
 
HitActor HitTestWithinLayer (Actor &actor, const RenderTask &renderTask, const Vector< RenderTaskList::Exclusive > &exclusives, const Vector4 &rayOrigin, const Vector4 &rayDir, float &nearClippingPlane, float &farClippingPlane, HitTestInterface &hitCheck, bool &stencilOnLayer, bool &stencilHit, bool &overlayHit, bool parentIsStencil, bool layerIs3d)
 Recursively hit test all the actors, without crossing into other layers. More...
 
bool IsWithinSourceActors (const Actor &sourceActor, const Actor &actor)
 Return true if actor is sourceActor or a descendent of sourceActor. More...
 
bool IsActuallyHittable (Layer &layer, const Vector2 &screenCoordinates, const Vector2 &stageSize, HitTestInterface &hitCheck)
 Returns true if the layer and all of the layer's parents are visible and sensitive. More...
 
void GetCameraClippingPlane (RenderTask &renderTask, float &nearClippingPlane, float &farClippingPlane)
 Gets the near and far clipping planes of the camera from which the scene is viewed in the render task. More...
 
bool HitTestRenderTask (const Vector< RenderTaskList::Exclusive > &exclusives, Stage &stage, LayerList &layers, RenderTask &renderTask, Vector2 screenCoordinates, Results &results, HitTestInterface &hitCheck)
 Hit test a RenderTask. More...
 
bool HitTestForEachRenderTask (Stage &stage, LayerList &layers, RenderTaskList &taskList, const Vector2 &screenCoordinates, Results &results, HitTestInterface &hitCheck)
 Iterate through RenderTaskList and perform hit test. More...
 

Function Documentation

void Dali::Internal::HitTestAlgorithm::anonymous_namespace{hit-test-algorithm-impl.cpp}::GetCameraClippingPlane ( RenderTask &  renderTask,
float &  nearClippingPlane,
float &  farClippingPlane 
)

Gets the near and far clipping planes of the camera from which the scene is viewed in the render task.

Definition at line 385 of file hit-test-algorithm-impl.cpp.

References Dali::Internal::RenderTask::GetCameraActor(), Dali::Internal::CameraActor::GetFarClippingPlane(), and Dali::Internal::CameraActor::GetNearClippingPlane().

Referenced by HitTestRenderTask().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Internal::HitTestAlgorithm::anonymous_namespace{hit-test-algorithm-impl.cpp}::HitTestForEachRenderTask ( Stage &  stage,
LayerList &  layers,
RenderTaskList &  taskList,
const Vector2 &  screenCoordinates,
Results &  results,
HitTestInterface &  hitCheck 
)

Iterate through RenderTaskList and perform hit test.

Returns
true if we have a hit, false otherwise

Definition at line 533 of file hit-test-algorithm-impl.cpp.

References Dali::Internal::RenderTaskList::GetExclusivesList(), Dali::GetImplementation(), Dali::Internal::RenderTask::GetTargetFrameBuffer(), Dali::Internal::RenderTaskList::GetTasks(), and HitTestRenderTask().

Referenced by Dali::Internal::HitTestAlgorithm::HitTest().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Internal::HitTestAlgorithm::anonymous_namespace{hit-test-algorithm-impl.cpp}::HitTestRenderTask ( const Vector< RenderTaskList::Exclusive > &  exclusives,
Stage &  stage,
LayerList &  layers,
RenderTask &  renderTask,
Vector2  screenCoordinates,
Results &  results,
HitTestInterface &  hitCheck 
)

Hit test a RenderTask.

Definition at line 395 of file hit-test-algorithm-impl.cpp.

References Dali::Internal::HitTestAlgorithm::Results::actor, Dali::Internal::HitTestAlgorithm::anonymous_namespace{hit-test-algorithm-impl.cpp}::HitActor::actor, Dali::Internal::HitTestAlgorithm::Results::actorCoordinates, Dali::Internal::CameraActor::BuildPickingRay(), Dali::Internal::HitTestAlgorithm::HitTestInterface::DoesLayerConsumeHit(), Dali::Internal::RenderTask::GetCameraActor(), GetCameraClippingPlane(), Dali::Internal::LayerList::GetLayer(), Dali::Internal::LayerList::GetLayerCount(), Dali::Internal::Stage::GetSize(), Dali::Internal::RenderTask::GetSourceActor(), Dali::Internal::RenderTask::GetViewport(), Dali::Rect< T >::height, HitTestWithinLayer(), IsActuallyHittable(), Dali::Internal::RenderTask::IsHittable(), Dali::Internal::Actor::IsRenderable(), IsWithinSourceActors(), Dali::Layer::LAYER_3D, Dali::Internal::HitTestAlgorithm::Results::rayDirection, Dali::Internal::HitTestAlgorithm::Results::rayOrigin, Dali::Internal::HitTestAlgorithm::Results::renderTask, Dali::Rect< T >::width, Dali::Internal::HitTestAlgorithm::anonymous_namespace{hit-test-algorithm-impl.cpp}::HitActor::x, Dali::Rect< T >::x, Dali::Vector2::x, Dali::Internal::HitTestAlgorithm::anonymous_namespace{hit-test-algorithm-impl.cpp}::HitActor::y, Dali::Rect< T >::y, and Dali::Vector2::y.

Referenced by Dali::Internal::HitTestAlgorithm::HitTest(), and HitTestForEachRenderTask().

Here is the call graph for this function:

Here is the caller graph for this function:

HitActor Dali::Internal::HitTestAlgorithm::anonymous_namespace{hit-test-algorithm-impl.cpp}::HitTestWithinLayer ( Actor &  actor,
const RenderTask &  renderTask,
const Vector< RenderTaskList::Exclusive > &  exclusives,
const Vector4 &  rayOrigin,
const Vector4 &  rayDir,
float &  nearClippingPlane,
float &  farClippingPlane,
HitTestInterface &  hitCheck,
bool &  stencilOnLayer,
bool &  stencilHit,
bool &  overlayHit,
bool  parentIsStencil,
bool  layerIs3d 
)

Recursively hit test all the actors, without crossing into other layers.

This algorithm performs a Depth-First-Search (DFS) on all Actors within Layer. Hit-Testing each Actor, noting the distance from the Ray-Origin (3D origin of touch vector). The closest Hit-Tested Actor is that which is returned. Exceptions to this rule are:

  • When comparing against renderable parents, if Actor is the same distance or closer than it's renderable parent, then it takes priority.

Definition at line 163 of file hit-test-algorithm-impl.cpp.

References Dali::Internal::HitTestAlgorithm::anonymous_namespace{hit-test-algorithm-impl.cpp}::HitActor::actor, Dali::Internal::HitTestAlgorithm::anonymous_namespace{hit-test-algorithm-impl.cpp}::HitActor::depth, Dali::Internal::HitTestAlgorithm::HitTestInterface::DescendActorHierarchy(), Dali::Internal::HitTestAlgorithm::anonymous_namespace{hit-test-algorithm-impl.cpp}::HitActor::distance, Dali::IntrusivePtr< T >::Get(), Dali::Internal::Actor::GetChildCount(), Dali::Internal::Actor::GetChildrenInternal(), Dali::Internal::Actor::GetCurrentSize(), Dali::Internal::Actor::GetDrawMode(), Dali::Internal::Actor::GetHierarchyDepth(), Dali::Internal::Actor::GetRendererAt(), Dali::Internal::Actor::GetRendererCount(), IsActorExclusiveToAnotherRenderTask(), Dali::Internal::HitTestAlgorithm::HitTestInterface::IsActorHittable(), Dali::Internal::Actor::IsOverlay(), Dali::Internal::Actor::IsRenderable(), Dali::Internal::Actor::IsVisible(), Dali::Toolkit::Text::min(), Dali::Internal::Actor::RayActorTest(), Dali::Internal::Actor::RaySphereTest(), Dali::DrawMode::STENCIL, Dali::Layer::TREE_DEPTH_MULTIPLIER, Dali::Internal::HitTestAlgorithm::anonymous_namespace{hit-test-algorithm-impl.cpp}::HitActor::x, Dali::Vector4::x, Dali::Internal::HitTestAlgorithm::anonymous_namespace{hit-test-algorithm-impl.cpp}::HitActor::y, and Dali::Vector4::y.

Referenced by HitTestRenderTask().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Internal::HitTestAlgorithm::anonymous_namespace{hit-test-algorithm-impl.cpp}::IsActorExclusiveToAnotherRenderTask ( const Actor &  actor,
const RenderTask &  renderTask,
const Vector< RenderTaskList::Exclusive > &  exclusives 
)

Check to see if the actor we're about to hit test is exclusively owned by another rendertask?

Definition at line 133 of file hit-test-algorithm-impl.cpp.

References Dali::Vector< T, IsTrivialType >::Begin(), Dali::Vector< T, IsTrivialType >::End(), and Dali::VectorBase::Size().

Referenced by HitTestWithinLayer().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Internal::HitTestAlgorithm::anonymous_namespace{hit-test-algorithm-impl.cpp}::IsActuallyHittable ( Layer layer,
const Vector2 &  screenCoordinates,
const Vector2 &  stageSize,
HitTestInterface &  hitCheck 
)
inline

Returns true if the layer and all of the layer's parents are visible and sensitive.

Definition at line 345 of file hit-test-algorithm-impl.cpp.

References Dali::Internal::HitTestAlgorithm::HitTestInterface::DescendActorHierarchy(), Dali::Internal::Layer::GetClippingBox(), Dali::Internal::Actor::GetParent(), Dali::Rect< T >::height, Dali::Internal::Layer::IsClipping(), Dali::Rect< T >::width, Dali::Rect< T >::x, Dali::Vector2::x, Dali::Rect< T >::y, and Dali::Vector2::y.

Referenced by HitTestRenderTask().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Internal::HitTestAlgorithm::anonymous_namespace{hit-test-algorithm-impl.cpp}::IsWithinSourceActors ( const Actor &  sourceActor,
const Actor &  actor 
)

Return true if actor is sourceActor or a descendent of sourceActor.

Definition at line 323 of file hit-test-algorithm-impl.cpp.

References Dali::Internal::Actor::GetParent().

Referenced by HitTestRenderTask().

Here is the call graph for this function:

Here is the caller graph for this function:

Dali Docs Home
Read more about Dali