Purge underscored header file barriers
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / transition-effects / cube-transition-cross-effect-impl.h
index dfe8eca..d9ce90f 100644 (file)
@@ -1,26 +1,27 @@
-#ifndef __DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_CROSS_EFFECT_H__
-#define __DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_CROSS_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.
-//
+#ifndef DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_CROSS_EFFECT_H
+#define DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_CROSS_EFFECT_H
+
+/*
+ * Copyright (c) 2019 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
 
 // EXTERNAL INCLUDES
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/transition-effects/cube-transition-cross-effect.h>
+#include <dali-toolkit/devel-api/transition-effects/cube-transition-cross-effect.h>
 #include <dali-toolkit/internal/transition-effects/cube-transition-effect-impl.h>
 
 namespace Dali
 #include <dali-toolkit/internal/transition-effects/cube-transition-effect-impl.h>
 
 namespace Dali
@@ -44,7 +45,7 @@ public:
   /**
    * @copydoc Toolkit::CubeTransitionCrossEffect::New
    */
   /**
    * @copydoc Toolkit::CubeTransitionCrossEffect::New
    */
-  static Toolkit::CubeTransitionCrossEffect New(unsigned int numRows, unsigned int numColumns, Size viewAreaSize);
+  static Toolkit::CubeTransitionCrossEffect New( unsigned int numRows, unsigned int numColumns );
 
 protected:
 
 
 protected:
 
@@ -58,34 +59,36 @@ protected:
     */
    virtual void OnStartTransition( Vector2 panPosition, Vector2 panDisplacement );
 
     */
    virtual void OnStartTransition( Vector2 panPosition, Vector2 panDisplacement );
 
-   /**
-    * @copydoc Toolkit::Internal::CubeTransitionEffect::OnStopTransition
-    */
-   virtual void OnStopTransition();
-
 private:
 
    /**
 private:
 
    /**
-    * Construct a new CubeTransitionCrossEffect object
+    * @brief Construct a new CubeTransitionCrossEffect object
+    *
     * @param[in] numRows How many rows of cubes
     * @param[in] numColumns How many columns of cubes
     * @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
     */
     */
-   CubeTransitionCrossEffect( unsigned int numRows, unsigned int numColumns, Size viewAreaSize );
+   CubeTransitionCrossEffect( unsigned int numRows, unsigned int numColumns );
 
    /**
 
    /**
-    * Set up animation to an Actor
+    * @brief Set up animation to an Actor
+    * This will also displace the cubes in the z direction by mCubeDisplacement and spread them apart on the xy plane
+    * given by the closeness of displacementCentre to the XY plane at 0.
+    *
     * @param[in] actorIndex The index of the cube in the cube array
     * @param[in] angle The angle of the rotation animation
     * @param[in] actorIndex The index of the cube in the cube array
     * @param[in] angle The angle of the rotation animation
-    * @param[in] axis The axis of the rotation animation
-    * @param[in] resetTranslation The translation used to reset the actor position before animation
+    * @param[in] the centre to "explode" the tiles outwards from
     */
     */
-
-   void SetupAnimation( unsigned int actorIndex, float angle, const Vector3 axis, Vector3 resetTranslation );
+   void SetupAnimation( unsigned int actorIndex, unsigned int x, unsigned int y, float angle, const Vector3 axis, const Vector3& displacementCentre );
 
 private:
 
 
 private:
 
-   float  mDisplacementRatio;
+   /**
+    * The factor that determines how spread apart from each other the cubes will go
+    * when they are displaced during the transition animation.
+    * The larger the value the more the spread apart the cubes will be.
+    * it should be in the range (0.0, +infinity)
+    */
+   float  mDisplacementSpreadFactor;
 
 }; //class CubeTransitionCrossEffect
 
 
 }; //class CubeTransitionCrossEffect
 
@@ -93,26 +96,26 @@ private:
 
 // Helpers for public-api forwarding methods
 
 
 // Helpers for public-api forwarding methods
 
-inline Internal::CubeTransitionCrossEffect& GetImpl(Dali::Toolkit::CubeTransitionCrossEffect& obj)
+inline Internal::CubeTransitionCrossEffect& GetImpl( Dali::Toolkit::CubeTransitionCrossEffect& obj )
 {
 {
-  DALI_ASSERT_ALWAYS(obj);
+  DALI_ASSERT_ALWAYS( obj );
 
 
-  Dali::BaseObject& handle = obj.GetBaseObject();
+  Dali::RefObject& handle = obj.GetImplementation();
 
 
-  return static_cast<Internal::CubeTransitionCrossEffect&>(handle);
+  return static_cast< Internal::CubeTransitionCrossEffect& >( handle );
 }
 
 }
 
-inline const Internal::CubeTransitionCrossEffect& GetImpl(const Dali::Toolkit::CubeTransitionCrossEffect& obj)
+inline const Internal::CubeTransitionCrossEffect& GetImpl( const Dali::Toolkit::CubeTransitionCrossEffect& 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::CubeTransitionCrossEffect&>(handle);
+  return static_cast< const Internal::CubeTransitionCrossEffect& >( handle );
 }
 
 } // namespace Toolkit
 
 } // namespace Dali
 
 }
 
 } // namespace Toolkit
 
 } // namespace Dali
 
-#endif /* __DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_CROSS_EFFECT_H_ */
+#endif // DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_CROSS_EFFECT_H