Reimplemented CubeTransitionEffect to use renderers and removed usage of ImageActor.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / transition-effects / cube-transition-wave-effect-impl.h
index 9cdfe96..d53ccc4 100644 (file)
@@ -1,26 +1,27 @@
 #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.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2014 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under 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
@@ -44,7 +45,7 @@ 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:
 
@@ -58,20 +59,14 @@ protected:
    */
   virtual void OnStartTransition( Vector2 panPosition, Vector2 panDisplacement );
 
-  /**
-   * @copydoc Toolkit::Internal::CubeTransitionEffect::OnStopTransition
-   */
-  virtual void OnStopTransition();
-
 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
@@ -80,7 +75,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
@@ -88,7 +83,7 @@ private:
    * @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:
 
@@ -107,22 +102,22 @@ 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::BaseObject& handle = obj.GetBaseObject();
+  Dali::RefObject& handle = obj.GetImplementation();
 
-  return static_cast<Internal::CubeTransitionWaveEffect&>(handle);
+  return static_cast< Internal::CubeTransitionWaveEffect& >( 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::BaseObject& handle = obj.GetBaseObject();
+  const Dali::RefObject& handle = obj.GetImplementation();
 
-  return static_cast<const Internal::CubeTransitionWaveEffect&>(handle);
+  return static_cast< const Internal::CubeTransitionWaveEffect& >( handle );
 }
 
 } // namespace Toolkit