X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftransition-effects%2Fcube-transition-wave-effect-impl.h;h=5b8a744b53fdaccb09b0337d9b01f9af7ef80caa;hp=a99f075da5ecb6c8cf1a37ac5ee9c4dabe2d4070;hb=7fe4f51894c4c9f158e64b3d11d5d9c8ebdbf990;hpb=2ddfbb9e23a7c3fc30e604236c41e0ef6d2ed6a2 diff --git a/dali-toolkit/internal/transition-effects/cube-transition-wave-effect-impl.h b/dali-toolkit/internal/transition-effects/cube-transition-wave-effect-impl.h index a99f075..5b8a744 100644 --- a/dali-toolkit/internal/transition-effects/cube-transition-wave-effect-impl.h +++ b/dali-toolkit/internal/transition-effects/cube-transition-wave-effect-impl.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_WAVE_EFFECT_H__ -#define __DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_WAVE_EFFECT_H__ +#ifndef DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_WAVE_EFFECT_H +#define DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_WAVE_EFFECT_H /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,58 +21,45 @@ // EXTERNAL INCLUDES // INTERNAL INCLUDES -#include +#include #include namespace Dali { - namespace Toolkit { - class CubeTransitionWaveEffect; namespace Internal { - class CubeTransitionEffect; class CubeTransitionWaveEffect : public CubeTransitionEffect { - public: - /** * @copydoc Toolkit::CubeTransitionWaveEffect::New */ - static Toolkit::CubeTransitionWaveEffect New(unsigned int numRows, unsigned int numColumns, Size viewAreaSize); + static Toolkit::CubeTransitionWaveEffect New(unsigned int numRows, unsigned int numColumns); protected: - /** * @copydoc Toolkit::Internal::CubeTransitionEffect::OnInitialize */ - virtual void OnInitialize(); + void OnInitialize() override; /** * @copydoc Toolkit::Internal::CubeTransitionEffect::OnStartTransition */ - virtual void OnStartTransition( Vector2 panPosition, Vector2 panDisplacement ); - - /** - * @copydoc Toolkit::Internal::CubeTransitionEffect::OnStopTransition - */ - virtual void OnStopTransition(); + void OnStartTransition(Vector2 panPosition, Vector2 panDisplacement) override; private: - /** * Construct a new CubeTransitionWaveEffect object * @param[in] numRows How many rows of cubes * @param[in] numColumns How many columns of cubes - * @param[in] viewAreaSize The size of view area for this transition effect */ - CubeTransitionWaveEffect( unsigned int numRows, unsigned int numColumns, Size viewAreaSize ); + CubeTransitionWaveEffect(unsigned int numRows, unsigned int numColumns); /** * The Saddle surface (Hyperbolic paraboloid)function is used to calculate the delay of rotating animation for each cube @@ -81,7 +68,7 @@ private: * @param[in] position The press down position of panGesture * @param[in] displacement The displacement vector of panGesture */ - void CalculateSaddleSurfaceParameters( Vector2 position, Vector2 displacement ); + void CalculateSaddleSurfaceParameters(Vector2 position, Vector2 displacement); /** * Calculate the delay of the animation for each cube @@ -89,18 +76,17 @@ private: * @param[in] y The Y coordinate of the cube * @return The delay time of the animation */ - float CalculateDelay(float x, float y); + float CalculateDelay(float x, float y, bool forward); private: - //saddle surface(Hyperbolic paraboloid)function, used to calculate the delay time of each cube //z = 1.0 + y*y/a/a - x*x/b/b //with our selection of parameters(a and b), this value for any cube is between 0.0 and 2.0 - float mSaddleAA; //a*a - float mSaddleBB; //b*b - float mSaddleB; //b - Vector2 mTranslation; - Vector2 mRotation; + float mSaddleAA; //a*a + float mSaddleBB; //b*b + float mSaddleB; //b + Vector2 mTranslation; + Vector2 mRotation; }; // class CubeTransitionWaveEffect @@ -112,7 +98,7 @@ inline Internal::CubeTransitionWaveEffect& GetImpl(Dali::Toolkit::CubeTransition { DALI_ASSERT_ALWAYS(obj); - Dali::BaseObject& handle = obj.GetBaseObject(); + Dali::RefObject& handle = obj.GetImplementation(); return static_cast(handle); } @@ -121,7 +107,7 @@ inline const Internal::CubeTransitionWaveEffect& GetImpl(const Dali::Toolkit::Cu { DALI_ASSERT_ALWAYS(obj); - const Dali::BaseObject& handle = obj.GetBaseObject(); + const Dali::RefObject& handle = obj.GetImplementation(); return static_cast(handle); } @@ -130,4 +116,4 @@ inline const Internal::CubeTransitionWaveEffect& GetImpl(const Dali::Toolkit::Cu } // namespace Dali -#endif /* __DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_WAVE_EFFECT_H__ */ +#endif // DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_WAVE_EFFECT_H