1 #ifndef DALI_SCENE3D_INTERNAL_LIGHT_OBSERVER_H
2 #define DALI_SCENE3D_INTERNAL_LIGHT_OBSERVER_H
5 * Copyright (c) 2022 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali-toolkit/public-api/dali-toolkit-common.h>
23 #include <dali/public-api/rendering/texture.h>
26 #include <dali-scene3d/public-api/light/light.h>
40 LightObserver() = default;
43 * @brief Virtual destructor.
45 virtual ~LightObserver() = default;
48 * @brief Notifies Image Based Light Textures are changed by parent SceneView.
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
55 virtual void NotifyImageBasedLightTexture(Dali::Texture diffuseTexture, Dali::Texture specularTexture, float scaleFactor, uint32_t specularMipmapLevels) = 0;
58 * @brief Notifies Scale Factor of Image Based Light is changed by parent SceneView.
60 * @param[in] scaleFactor scale factor that controls light source intensity in [0.0f, 1.0f].
62 virtual void NotifyImageBasedLightScaleFactor(float scaleFactor) = 0;
65 * @brief Notifies new light is added on SceneView
67 * @param[in] lightIndex Index of added light.
68 * @param[in] light Added light.
70 virtual void NotifyLightAdded(uint32_t lightIndex, Scene3D::Light light) = 0;
73 * @brief Notifies a light is removed from SceneView
75 * @param[in] lightIndex Index of light to be removed.
77 virtual void NotifyLightRemoved(uint32_t lightIndex) = 0;
80 } // namespace Internal
82 } // namespace Scene3D
86 #endif // DALI_SCENE3D_INTERNAL_LIGHT_OBSERVER_H