Remove some dead code related to scene graph animator classes 49/192449/2
authorKimmo Hoikka <kimmo.hoikka@samsung.com>
Mon, 5 Nov 2018 16:45:32 +0000 (16:45 +0000)
committerKimmo Hoikka <kimmo.hoikka@samsung.com>
Tue, 6 Nov 2018 10:09:25 +0000 (10:09 +0000)
Change-Id: I1874eab903cabe883e36a9862fe02ee2133d18e3

dali/internal/event/animation/progress-value.h
dali/internal/update/animation/property-accessor.h
dali/internal/update/animation/scene-graph-animator.h
dali/internal/update/common/property-vector3.h [deleted file]
dali/internal/update/nodes/node.h

index 1cbe730..b837131 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_INTERNAL_PROGRESS_VALUE_H__
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -23,6 +23,7 @@
 #include <dali/public-api/math/quaternion.h>
 #include <dali/public-api/math/vector2.h>
 #include <dali/public-api/math/vector3.h>
+#include <dali/public-api/math/vector4.h>
 
 namespace Dali
 {
@@ -82,16 +83,11 @@ inline void Interpolate (bool& result, bool a, bool b, float progress)
   result = progress < 0.5f ? a : b;
 }
 
-inline void Interpolate (int& result, int a, int b, float progress)
+inline void Interpolate (int32_t& result, int a, int b, float progress)
 {
   result = static_cast<int>(static_cast<float>( a ) + static_cast<float>(b - a) * progress + 0.5f);
 }
 
-inline void Interpolate (unsigned int& result, unsigned int a, unsigned int b, float progress)
-{
-  result = static_cast<unsigned int>( static_cast<float>( a ) + static_cast<float>(b - a) * progress + 0.5f);
-}
-
 inline void Interpolate (float& result, float a, float b, float progress)
 {
   result = a + (b-a) * progress;
@@ -119,7 +115,7 @@ inline void Interpolate (Vector4& result, const Vector4& a, const Vector4& b, fl
  * Restrictions: f(0)=p1   f(1)=p2   f'(0)=(p2-p0)*0.5   f'(1)=(p3-p1)*0.5
  */
 
-inline void CubicInterpolate( int& result, int p0, int p1, int p2, int p3, float progress )
+inline void CubicInterpolate( int32_t& result, int32_t p0, int32_t p1, int32_t p2, int32_t p3, float progress )
 {
   float a3 = static_cast<float>( p3 ) * 0.5f - static_cast<float>( p2 ) * 1.5f + static_cast<float>( p1 ) * 1.5f - static_cast<float>( p0 ) * 0.5f;
   float a2 = static_cast<float>( p0 ) - static_cast<float>( p1 ) * 2.5f + static_cast<float>( p2 ) * 2.0f - static_cast<float>( p3 ) * 0.5f;
@@ -128,15 +124,6 @@ inline void CubicInterpolate( int& result, int p0, int p1, int p2, int p3, float
   result = static_cast<int>( a3*progress*progress*progress + a2*progress*progress + a1*progress + static_cast<float>( p1 ) + 0.5f );
 }
 
-inline void CubicInterpolate( unsigned int& result, unsigned int p0, unsigned int p1, unsigned int p2, unsigned int p3, float progress )
-{
-  float a3 = static_cast<float>( p3 ) * 0.5f - static_cast<float>( p2 ) * 1.5f + static_cast<float>( p1 ) * 1.5f - static_cast<float>( p0 ) * 0.5f;
-  float a2 = static_cast<float>( p0 ) - static_cast<float>( p1 ) * 2.5f + static_cast<float>( p2 ) * 2.0f - static_cast<float>( p3 ) * 0.5f;
-  float a1 = static_cast<float>( p2 - p0 ) * 0.5f;
-
-  result = static_cast<unsigned int>( a3*progress*progress*progress + a2*progress*progress + a1*progress + static_cast<float>( p1 ) + 0.5f );
-}
-
 inline void CubicInterpolate( float& result, float p0, float p1, float  p2, float  p3, float progress )
 {
   float a3 = p3*0.5f - p2*1.5f + p1*1.5f - p0*0.5f;
index f745112..d26ad90 100644 (file)
@@ -217,7 +217,7 @@ private:
 };
 
 
-template <typename T, unsigned int COMPONENT>
+template <typename T, uint32_t COMPONENT>
 class TransformManagerPropertyComponentAccessor
 {
 public:
index 36caa07..ce7b1c0 100644 (file)
@@ -802,11 +802,6 @@ struct AnimatorFunctionBase
     return static_cast<float>( property );
   }
 
-  virtual float operator()(float progress, const uint32_t& property)
-  {
-    return static_cast<float>( property );
-  }
-
   virtual float operator()(float progress, const float& property)
   {
     return property;
diff --git a/dali/internal/update/common/property-vector3.h b/dali/internal/update/common/property-vector3.h
deleted file mode 100644 (file)
index 463ff28..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-#ifndef __DALI_INTERNAL_SCENE_GRAPH_VECTOR3_PROPERTY_H__
-#define __DALI_INTERNAL_SCENE_GRAPH_VECTOR3_PROPERTY_H__
-
-/*
- * 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.
- *
- */
-
-// INTERNAL INCLUDES
-#include <dali/public-api/common/dali-common.h>
-#include <dali/public-api/math/vector3.h>
-#include <dali/public-api/object/property.h>
-#include <dali/public-api/object/property-input.h>
-#include <dali/public-api/object/property-types.h>
-#include <dali/internal/common/buffer-index.h>
-#include <dali/internal/event/common/property-input-impl.h>
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace SceneGraph
-{
-
-/**
- * A Vector3 non-animatable property.
- */
-class PropertyVector3 : public PropertyInputImpl
-{
-public:
-
-  /**
-   * Create an non-animatable property.
-   * @param [in] initialValue The initial value of the property.
-   */
-  PropertyVector3( Vector3 initialValue )
-  : mValue( initialValue ),
-    mDirtyFlag( true )
-  {
-  }
-
-  /**
-   * Virtual destructor.
-   */
-  virtual ~PropertyVector3()
-  {
-  }
-
-  /**
-   * Clear the dirty flag
-   */
-  void Clear()
-  {
-    mDirtyFlag = false;
-  }
-
-  /**
-   * @copydoc Dali::Internal::PropertyInputImpl::GetType()
-   */
-  virtual Dali::Property::Type GetType() const
-  {
-    return Dali::PropertyTypes::Get<Vector3>();
-  }
-
-  /**
-   * @copydoc Dali::Internal::PropertyInputImpl::InputInitialized()
-   */
-  virtual bool InputInitialized() const
-  {
-    return true;
-  }
-
-  /**
-   * @copydoc Dali::Internal::PropertyInputImpl::InputChanged()
-   */
-  virtual bool InputChanged() const
-  {
-    return mDirtyFlag;
-  }
-
-  /**
-   * @copydoc Dali::PropertyInput::GetVector3()
-   */
-  virtual const Vector3& GetVector3( BufferIndex bufferIndex ) const
-  {
-    return mValue;
-  }
-
-  /**
-   * Flag that the property has been Set during the current frame.
-   */
-  void OnSet()
-  {
-    mDirtyFlag = true;
-  }
-
-private:
-
-  // Undefined
-  PropertyVector3(const PropertyVector3& property);
-
-  // Undefined
-  PropertyVector3& operator=(const PropertyVector3& rhs);
-
-public:
-
-  Vector3 mValue; ///< The property value
-
-private:
-
-  bool mDirtyFlag;
-
-};
-
-} // namespace SceneGraph
-
-} // namespace Internal
-
-} // namespace Dali
-
-#endif // __DALI_INTERNAL_SCENE_GRAPH_VECTOR3_PROPERTY_H__
index 4ba53e3..fd18fee 100755 (executable)
@@ -30,7 +30,6 @@
 #include <dali/internal/render/data-providers/node-data-provider.h>
 #include <dali/internal/update/common/animatable-property.h>
 #include <dali/internal/update/common/property-owner.h>
-#include <dali/internal/update/common/property-vector3.h>
 #include <dali/internal/update/common/scene-graph-buffers.h>
 #include <dali/internal/update/common/inherited-property.h>
 #include <dali/internal/update/manager/transform-manager.h>