-#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.
// EXTERNAL INCLUDES
// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/transition-effects/cube-transition-wave-effect.h>
+#include <dali-toolkit/devel-api/transition-effects/cube-transition-wave-effect.h>
#include <dali-toolkit/internal/transition-effects/cube-transition-effect-impl.h>
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
* @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
* @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
{
DALI_ASSERT_ALWAYS(obj);
- Dali::BaseObject& handle = obj.GetBaseObject();
+ Dali::RefObject& handle = obj.GetImplementation();
return static_cast<Internal::CubeTransitionWaveEffect&>(handle);
}
{
DALI_ASSERT_ALWAYS(obj);
- const Dali::BaseObject& handle = obj.GetBaseObject();
+ const Dali::RefObject& handle = obj.GetImplementation();
return static_cast<const Internal::CubeTransitionWaveEffect&>(handle);
}
} // namespace Dali
-#endif /* __DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_WAVE_EFFECT_H__ */
+#endif // DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_WAVE_EFFECT_H