1 #ifndef __DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_CROSS_EFFECT_H__
2 #define __DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_CROSS_EFFECT_H__
5 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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.
24 #include <dali-toolkit/public-api/transition-effects/cube-transition-cross-effect.h>
25 #include <dali-toolkit/internal/transition-effects/cube-transition-effect-impl.h>
33 class CubeTransitionCrossEffect;
38 class CubeTransitionEffect;
40 class CubeTransitionCrossEffect : public CubeTransitionEffect
46 * @copydoc Toolkit::CubeTransitionCrossEffect::New
48 static Toolkit::CubeTransitionCrossEffect New(unsigned int numRows, unsigned int numColumns, Size viewAreaSize);
53 * @copydoc Toolkit::Internal::CubeTransitionEffect::OnInitialize
55 virtual void OnInitialize();
58 * @copydoc Toolkit::Internal::CubeTransitionEffect::OnStartTransition
60 virtual void OnStartTransition( Vector2 panPosition, Vector2 panDisplacement );
63 * @copydoc Toolkit::Internal::CubeTransitionEffect::OnStopTransition
65 virtual void OnStopTransition();
70 * Construct a new CubeTransitionCrossEffect object
71 * @param[in] numRows How many rows of cubes
72 * @param[in] numColumns How many columns of cubes
73 * @param[in] viewAreaSize The size of view area for this transition effect
75 CubeTransitionCrossEffect( unsigned int numRows, unsigned int numColumns, Size viewAreaSize );
78 * Set up animation to an Actor
79 * @param[in] actorIndex The index of the cube in the cube array
80 * @param[in] angle The angle of the rotation animation
81 * @param[in] axis The axis of the rotation animation
82 * @param[in] resetTranslation The translation used to reset the actor position before animation
85 void SetupAnimation( unsigned int actorIndex, float angle, const Vector3 axis, Vector3 resetTranslation );
89 float mDisplacementRatio;
91 }; //class CubeTransitionCrossEffect
93 } // namespace Internal
95 // Helpers for public-api forwarding methods
97 inline Internal::CubeTransitionCrossEffect& GetImpl(Dali::Toolkit::CubeTransitionCrossEffect& obj)
99 DALI_ASSERT_ALWAYS(obj);
101 Dali::BaseObject& handle = obj.GetBaseObject();
103 return static_cast<Internal::CubeTransitionCrossEffect&>(handle);
106 inline const Internal::CubeTransitionCrossEffect& GetImpl(const Dali::Toolkit::CubeTransitionCrossEffect& obj)
108 DALI_ASSERT_ALWAYS(obj);
110 const Dali::BaseObject& handle = obj.GetBaseObject();
112 return static_cast<const Internal::CubeTransitionCrossEffect&>(handle);
115 } // namespace Toolkit
119 #endif /* __DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_CROSS_EFFECT_H_ */