[dali_2.3.21] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-scene3d / internal / common / light-observer.h
1 #ifndef DALI_SCENE3D_INTERNAL_LIGHT_OBSERVER_H
2 #define DALI_SCENE3D_INTERNAL_LIGHT_OBSERVER_H
3
4 /*
5  * Copyright (c) 2022 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <dali-toolkit/public-api/dali-toolkit-common.h>
23 #include <dali/public-api/rendering/texture.h>
24
25 // INTERNAL INCLUDES
26 #include <dali-scene3d/public-api/light/light.h>
27
28 namespace Dali
29 {
30 namespace Scene3D
31 {
32 namespace Internal
33 {
34 class LightObserver
35 {
36 public:
37   /**
38    * @brief Constructor.
39    */
40   LightObserver() = default;
41
42   /**
43    * @brief Virtual destructor.
44    */
45   virtual ~LightObserver() = default;
46
47   /**
48    * @brief Notifies Image Based Light Textures are changed by parent SceneView.
49    *
50    * @param[in] diffuseTexture cube map texture that can be used as a diffuse IBL source.
51    * @param[in] specularTexture cube map texture that can be used as a specular IBL source.
52    * @param[in] scaleFactor scale factor that controls light source intensity in [0.0f, 1.0f]. Default value is 1.0f.
53    * @param[in] specularMipmapLevels mipmap levels of specular texture
54    */
55   virtual void NotifyImageBasedLightTexture(Dali::Texture diffuseTexture, Dali::Texture specularTexture, float scaleFactor, uint32_t specularMipmapLevels) = 0;
56
57   /**
58    * @brief Notifies Scale Factor of Image Based Light is changed by parent SceneView.
59    *
60    * @param[in] scaleFactor scale factor that controls light source intensity in [0.0f, 1.0f].
61    */
62   virtual void NotifyImageBasedLightScaleFactor(float scaleFactor) = 0;
63
64   /**
65    * @brief Notifies Shadow Map texture is changed by parent SceneView.
66    *
67    * @param[in] shadowMapTexture Shadow Map texture that will be used to compute shadow.
68    */
69   virtual void NotifyShadowMapTexture(Dali::Texture shadowMapTexture) = 0;
70 };
71
72 } // namespace Internal
73
74 } // namespace Scene3D
75
76 } // namespace Dali
77
78 #endif // DALI_SCENE3D_INTERNAL_LIGHT_OBSERVER_H