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=d53ccc4ddf15a04b09d635bbd57ea0bf1247e6fe;hb=7fe4f51894c4c9f158e64b3d11d5d9c8ebdbf990;hpb=3f3cb4f8020f60d4d5dc672ddc426cb73126f80d 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 d53ccc4..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. @@ -26,47 +26,40 @@ 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 ); + 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 ); + 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 */ - CubeTransitionWaveEffect( unsigned int numRows, unsigned int numColumns ); + 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 @@ -75,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 @@ -83,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, bool forward ); + 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 @@ -102,26 +94,26 @@ private: // Helpers for public-api forwarding methods -inline Internal::CubeTransitionWaveEffect& GetImpl( Dali::Toolkit::CubeTransitionWaveEffect& obj ) +inline Internal::CubeTransitionWaveEffect& GetImpl(Dali::Toolkit::CubeTransitionWaveEffect& obj) { - DALI_ASSERT_ALWAYS( obj ); + DALI_ASSERT_ALWAYS(obj); Dali::RefObject& handle = obj.GetImplementation(); - return static_cast< Internal::CubeTransitionWaveEffect& >( handle ); + return static_cast(handle); } -inline const Internal::CubeTransitionWaveEffect& GetImpl( const Dali::Toolkit::CubeTransitionWaveEffect& obj ) +inline const Internal::CubeTransitionWaveEffect& GetImpl(const Dali::Toolkit::CubeTransitionWaveEffect& obj) { - DALI_ASSERT_ALWAYS( obj ); + DALI_ASSERT_ALWAYS(obj); const Dali::RefObject& handle = obj.GetImplementation(); - return static_cast< const Internal::CubeTransitionWaveEffect& >( handle ); + return static_cast(handle); } } // namespace Toolkit } // namespace Dali -#endif /* __DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_WAVE_EFFECT_H__ */ +#endif // DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_WAVE_EFFECT_H