1 #ifndef DALI_SCENE3D_LOADER_ENVIRONMENT_MAP_DATA_H
2 #define DALI_SCENE3D_LOADER_ENVIRONMENT_MAP_DATA_H
4 * Copyright (c) 2023 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
21 #include <dali-scene3d/public-api/api.h>
22 #include <dali-scene3d/public-api/common/environment-map.h>
25 #include <dali/public-api/common/vector-wrapper.h>
26 #include <dali/public-api/images/pixel-data.h>
27 #include <dali/public-api/rendering/texture.h>
28 #include <dali/public-api/rendering/shader.h>
37 * @brief Stores the pixel data objects for environment map texture.
38 * EnvironmentMapData supports cube map that contains textures for 6 faces, or
39 * an equirectangular image.
41 class DALI_SCENE3D_API EnvironmentMapData
45 * @brief Retrieves environment map texture from image file
46 * @return texture for loaded environment map.
51 * @brief Sets environment map type
52 * @param[in] environmentMapType environment map type
54 void SetEnvironmentMapType(Dali::Scene3D::EnvironmentMapType environmentMapType)
56 if(mEnvironmentMapType != environmentMapType)
58 mEnvironmentMapTexture.Reset();
59 mEnvironmentMapType = environmentMapType;
64 * @brief Retrieves environment map type.
65 * @return environment map type
67 Dali::Scene3D::EnvironmentMapType GetEnvironmentMapType() const
69 return mEnvironmentMapType;
73 std::vector<std::vector<PixelData> > mPixelData;
76 Dali::Texture mEnvironmentMapTexture;
77 Dali::Shader mEnvironmentMapShader;
78 Dali::Scene3D::EnvironmentMapType mEnvironmentMapType{Dali::Scene3D::EnvironmentMapType::AUTO};
82 } // namespace Scene3D
85 #endif // DALI_SCENE3D_LOADER_ENVIRONMENT_MAP_DATA_H