From f7892617701f1ae501fac0a58f8dfec0f5fabb37 Mon Sep 17 00:00:00 2001 From: Francisco Santos Date: Thu, 27 Feb 2014 18:44:08 +0000 Subject: [PATCH] Hide the sort function implementation and remove the unused functions. [Issue#] (N/A) [Problem] [Cause] [Solution] --- capi/dali/public-api/actors/layer.h | 23 +---------------------- dali/public-api/actors/layer.cpp | 5 +++++ 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/capi/dali/public-api/actors/layer.h b/capi/dali/public-api/actors/layer.h index 3914cb7..f6a3054 100644 --- a/capi/dali/public-api/actors/layer.h +++ b/capi/dali/public-api/actors/layer.h @@ -243,24 +243,6 @@ public: // Sorting /** - * This sort function sorts according to the sum of the displacement (x,y,z) from camera. - */ - static float SumOfDisplacements( const Vector3& position, float sortModifier ) - { - return fabsf(position.x) + fabsf(position.y) + fabsf(position.z) + sortModifier; - } - - /** - * This sort function sorts according to the distance from camera. - * - * Distance = Length of position vector, + modifier (to help order transparent objects that are very close) - */ - static float DistanceFromOrigin(const Vector3& position, float sortModifier) - { - return position.Length() + sortModifier; - } - - /** * This sort function sorts actors according to the Z-value in the camera coordinate system. * * This is useful for 2D user interfaces. @@ -270,10 +252,7 @@ public: * We return a negative z value as in our translation, a low z means that it should * be sorted further away and a high z means that it should be closer. */ - static float ZValue(const Vector3& position, float sortModifier) - { - return -position.z + sortModifier; - } + static float ZValue(const Vector3& position, float sortModifier); /** * This allows the user to specify the sort function that the layer should use. diff --git a/dali/public-api/actors/layer.cpp b/dali/public-api/actors/layer.cpp index b435eac..2904160 100644 --- a/dali/public-api/actors/layer.cpp +++ b/dali/public-api/actors/layer.cpp @@ -132,6 +132,11 @@ bool Layer::IsDepthTestDisabled() const return GetImplementation(*this).IsDepthTestDisabled(); } +float Layer::ZValue(const Vector3& position, float sortModifier) +{ + return -position.z + sortModifier; +} + void Layer::SetSortFunction(SortFunctionType function) { GetImplementation(*this).SetSortFunction(function); -- 2.7.4