1 #ifndef __DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_FOLD_EFFECT_H__
2 #define __DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_FOLD_EFFECT_H__
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
11 // http://floralicense.org/license/
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.
23 #include <dali-toolkit/public-api/transition-effects/cube-transition-fold-effect.h>
24 #include <dali-toolkit/internal/transition-effects/cube-transition-effect-impl.h>
32 class CubeTransitionFoldEffect;
37 class CubeTransitionEffect;
39 class CubeTransitionFoldEffect : public CubeTransitionEffect
45 * @copydoc Toolkit::CubeTransitionFoldEffect::New
47 static Toolkit::CubeTransitionFoldEffect New(unsigned int numRows, unsigned int numColumns, Size viewAreaSize);
52 * @copydoc Toolkit::CubeTransitionEffect::OnInitialize
54 virtual void OnInitialize();
57 * @copydoc Toolkit::CubeTransitionEffect::OnStartTransition
59 virtual void OnStartTransition( Vector2 panPosition, Vector2 panDisplacement );
62 * @copydoc Toolkit::Internal::CubeTransitionEffect::OnStopTransition
64 virtual void OnStopTransition();
68 * Construct a new CubeTransitionFoldEffect object
69 * @param[in] numRows How many rows of cubes
70 * @param[in] numColumns How many columns of cubes
71 * @param[in] viewAreaSize The size of view area for this transition effect
73 CubeTransitionFoldEffect( unsigned int numRows, unsigned int numColumns, Size viewAreaSize );
76 * Set up animation to an Actor
77 * @param[in] actorIndex The index of the cube in the cube array
78 * @param[in] angle The angle of the rotation animation
79 * @param[in] resetTranslation The translation used to reset the actor position before animation
82 void SetupAnimation( unsigned int actorIndex, float angle, Vector3 resetTranslation );
86 static const float mDisplacementRatio;
88 }; //class CubeTransitionFoldEffect
90 } // namespace Internal
92 // Helpers for public-api forwarding methods
94 inline Internal::CubeTransitionFoldEffect& GetImpl(Dali::Toolkit::CubeTransitionFoldEffect& obj)
96 DALI_ASSERT_ALWAYS(obj);
98 Dali::BaseObject& handle = obj.GetBaseObject();
100 return static_cast<Internal::CubeTransitionFoldEffect&>(handle);
103 inline const Internal::CubeTransitionFoldEffect& GetImpl(const Dali::Toolkit::CubeTransitionFoldEffect& obj)
105 DALI_ASSERT_ALWAYS(obj);
107 const Dali::BaseObject& handle = obj.GetBaseObject();
109 return static_cast<const Internal::CubeTransitionFoldEffect&>(handle);
112 } // namespace Toolkit
116 #endif /* __DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_FOLD_EFFECT_H_ */