Revert "License conversion from Flora to Apache 2.0"
[platform/core/uifw/dali-toolkit.git] / optional / dali-toolkit / internal / transition-effects / cube-transition-cross-effect-impl.h
1 #ifndef __DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_CROSS_EFFECT_H__
2 #define __DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_CROSS_EFFECT_H__
3
4 //
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 //
7 // Licensed under the Flora License, Version 1.0 (the License);
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 //     http://floralicense.org/license/
12 //
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an AS IS BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
18 //
19
20 // EXTERNAL INCLUDES
21
22 // INTERNAL INCLUDES
23 #include <dali-toolkit/public-api/transition-effects/cube-transition-cross-effect.h>
24 #include <dali-toolkit/internal/transition-effects/cube-transition-effect-impl.h>
25
26 namespace Dali
27 {
28
29 namespace Toolkit
30 {
31
32 class CubeTransitionCrossEffect;
33
34 namespace Internal
35 {
36
37 class CubeTransitionEffect;
38
39 class CubeTransitionCrossEffect : public CubeTransitionEffect
40 {
41
42 public:
43
44   /**
45    * @copydoc Toolkit::CubeTransitionCrossEffect::New
46    */
47   static Toolkit::CubeTransitionCrossEffect New(unsigned int numRows, unsigned int numColumns, Size viewAreaSize);
48
49 protected:
50
51    /**
52     * @copydoc Toolkit::Internal::CubeTransitionEffect::OnInitialize
53     */
54    virtual void OnInitialize();
55
56    /**
57     * @copydoc Toolkit::Internal::CubeTransitionEffect::OnStartTransition
58     */
59    virtual void OnStartTransition( Vector2 panPosition, Vector2 panDisplacement );
60
61    /**
62     * @copydoc Toolkit::Internal::CubeTransitionEffect::OnStopTransition
63     */
64    virtual void OnStopTransition();
65
66 private:
67
68    /**
69     * Construct a new CubeTransitionCrossEffect object
70     * @param[in] numRows How many rows of cubes
71     * @param[in] numColumns How many columns of cubes
72     * @param[in] viewAreaSize The size of view area for this transition effect
73     */
74    CubeTransitionCrossEffect( unsigned int numRows, unsigned int numColumns, Size viewAreaSize );
75
76    /**
77     * Set up animation to an Actor
78     * @param[in] actorIndex The index of the cube in the cube array
79     * @param[in] angle The angle of the rotation animation
80     * @param[in] axis The axis of the rotation animation
81     * @param[in] resetTranslation The translation used to reset the actor position before animation
82     */
83
84    void SetupAnimation( unsigned int actorIndex, float angle, const Vector3 axis, Vector3 resetTranslation );
85
86 private:
87
88    float  mDisplacementRatio;
89
90 }; //class CubeTransitionCrossEffect
91
92 } // namespace Internal
93
94 // Helpers for public-api forwarding methods
95
96 inline Internal::CubeTransitionCrossEffect& GetImpl(Dali::Toolkit::CubeTransitionCrossEffect& obj)
97 {
98   DALI_ASSERT_ALWAYS(obj);
99
100   Dali::BaseObject& handle = obj.GetBaseObject();
101
102   return static_cast<Internal::CubeTransitionCrossEffect&>(handle);
103 }
104
105 inline const Internal::CubeTransitionCrossEffect& GetImpl(const Dali::Toolkit::CubeTransitionCrossEffect& obj)
106 {
107   DALI_ASSERT_ALWAYS(obj);
108
109   const Dali::BaseObject& handle = obj.GetBaseObject();
110
111   return static_cast<const Internal::CubeTransitionCrossEffect&>(handle);
112 }
113
114 } // namespace Toolkit
115
116 } // namespace Dali
117
118 #endif /* __DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_CROSS_EFFECT_H_ */