[dali_2.3.16] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-scene3d / internal / light / light-impl.h
index c691423..6f0ff24 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_SCENE3D_LIGHT_IMPL_H
 
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
@@ -19,7 +19,7 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/actors/custom-actor-impl.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/object/weak-handle.h>
 #include <string_view>
@@ -44,7 +44,7 @@ namespace Internal
  *
  * @SINCE_2_2.32
  */
-class DALI_SCENE3D_API Light : public CustomActorImpl
+class DALI_SCENE3D_API Light : public Toolkit::Internal::Control
 {
 public:
   // Creation & Destruction
@@ -57,61 +57,6 @@ public:
    */
   static Scene3D::Light New();
 
-  /**
-   * @copydoc Scene3D::Light::Enable()
-   */
-  void Enable(bool enable);
-
-  /**
-   * @copydoc Scene3D::Light::IsEnabled()
-   */
-  bool IsEnabled() const;
-
-  /**
-   * @copydoc Scene3D::Light::EnableShadow()
-   */
-  void EnableShadow(bool enable);
-
-  /**
-   * @copydoc Scene3D::Light::IsShadowEnabled()
-   */
-  bool IsShadowEnabled() const;
-
-  /**
-   * @copydoc Scene3D::Light::GetCamera()
-   */
-  CameraActor GetCamera() const;
-
-  /**
-   * @copydoc Scene3D::Light::EnableShadowSoftFiltering()
-   */
-  void EnableShadowSoftFiltering(bool useSoftFiltering);
-
-  /**
-   * @copydoc Scene3D::Light::IsShadowSoftFilteringEnabled()
-   */
-  bool IsShadowSoftFilteringEnabled() const;
-
-  /**
-   * @copydoc Scene3D::Light::SetShadowIntensity()
-   */
-  void SetShadowIntensity(float shadowIntensity);
-
-  /**
-   * @copydoc Scene3D::Light::GetShadowIntensity()
-   */
-  float GetShadowIntensity() const;
-
-  /**
-   * @copydoc Scene3D::Light::SetShadowBias()
-   */
-  void SetShadowBias(float shadowBias);
-
-  /**
-   * @copydoc Scene3D::Light::GetShadowBias()
-   */
-  float GetShadowBias() const;
-
 protected:
   /**
    * @brief Virtual destructor.
@@ -119,7 +64,13 @@ protected:
    */
   virtual ~Light();
 
-protected: // From CustomActorImpl
+public: // From Internal::Control.
+  /**
+   * @copydoc Dali::Toolkit::Internal::Control::OnInitialize()
+   */
+  void OnInitialize() override;
+
+protected: // From CustomActorImpl. Note that it will make we can ignore many codes what Internal::Control using now.
   /**
    * @copydoc CustomActorImpl::OnSceneConnection()
    * @note If overridden, then an up-call to Light::OnSceneConnection MUST be made at the end.
@@ -209,13 +160,63 @@ protected:
    */
   Light();
 
+public: // Public Method
   /**
-   * @brief Second phase initialization.
+   * @copydoc Scene3D::Light::Enable()
    */
-  void Initialize();
+  void Enable(bool enable);
 
-public: // Public Method
+  /**
+   * @copydoc Scene3D::Light::IsEnabled()
+   */
+  bool IsEnabled() const;
+
+  /**
+   * @copydoc Scene3D::Light::EnableShadow()
+   */
+  void EnableShadow(bool enable);
+
+  /**
+   * @copydoc Scene3D::Light::IsShadowEnabled()
+   */
+  bool IsShadowEnabled() const;
+
+  /**
+   * @copydoc Scene3D::Light::GetCamera()
+   */
+  CameraActor GetCamera() const;
+
+  /**
+   * @copydoc Scene3D::Light::EnableShadowSoftFiltering()
+   */
+  void EnableShadowSoftFiltering(bool useSoftFiltering);
+
+  /**
+   * @copydoc Scene3D::Light::IsShadowSoftFilteringEnabled()
+   */
+  bool IsShadowSoftFilteringEnabled() const;
+
+  /**
+   * @copydoc Scene3D::Light::SetShadowIntensity()
+   */
+  void SetShadowIntensity(float shadowIntensity);
+
+  /**
+   * @copydoc Scene3D::Light::GetShadowIntensity()
+   */
+  float GetShadowIntensity() const;
+
+  /**
+   * @copydoc Scene3D::Light::SetShadowBias()
+   */
+  void SetShadowBias(float shadowBias);
+
+  /**
+   * @copydoc Scene3D::Light::GetShadowBias()
+   */
+  float GetShadowBias() const;
 
+public: // Public Static Method
   /**
    * @copydoc Scene3D::Light::GetMaximumEnabledLightCount()
    */
@@ -258,10 +259,10 @@ private:
   /// @cond internal
 
   // Not copyable or movable
-  DALI_INTERNAL        Light(const Light&)     = delete; ///< Deleted copy constructor.
-  DALI_INTERNAL        Light(Light&&)          = delete; ///< Deleted move constructor.
+  DALI_INTERNAL Light(const Light&) = delete;            ///< Deleted copy constructor.
+  DALI_INTERNAL Light(Light&&)      = delete;            ///< Deleted move constructor.
   DALI_INTERNAL Light& operator=(const Light&) = delete; ///< Deleted copy assignment operator.
-  DALI_INTERNAL Light& operator=(Light&&)      = delete; ///< Deleted move assignment operator.
+  DALI_INTERNAL Light& operator=(Light&&) = delete;      ///< Deleted move assignment operator.
 
 private:
   Dali::CameraActor              mLightSourceActor;