#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.
*/
// 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>
*
* @SINCE_2_2.32
*/
-class DALI_SCENE3D_API Light : public CustomActorImpl
+class DALI_SCENE3D_API Light : public Toolkit::Internal::Control
{
public:
// Creation & Destruction
*/
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.
*/
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.
*/
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()
*/
/// @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;