1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef API_3D_RENDER_IRENDER_DATA_STORE_DEFAULT_SCENE_H 17 #define API_3D_RENDER_IRENDER_DATA_STORE_DEFAULT_SCENE_H 18 19 #include <3d/render/render_data_defines_3d.h> 20 #include <base/containers/string_view.h> 21 #include <core/namespace.h> 22 #include <render/datastore/intf_render_data_store.h> 23 CORE3D_BEGIN_NAMESPACE()24CORE3D_BEGIN_NAMESPACE() 25 /** @ingroup group_render_irenderdatastoredefaultscene */ 26 /** RenderDataStoreDefaultScene interface. 27 * Not internally syncronized. 28 */ 29 class IRenderDataStoreDefaultScene : public RENDER_NS::IRenderDataStore { 30 public: 31 static constexpr BASE_NS::Uid UID { "1f43a445-1e26-417b-878a-d3044fde6e2c" }; 32 33 ~IRenderDataStoreDefaultScene() override = default; 34 35 /** Set scene 36 * @param scene Default scene to set 37 */ 38 virtual void SetScene(const RenderScene& scene) = 0; 39 40 /** Get scene. 41 * @param name Name of the scene. 42 * @return render scene. 43 */ 44 virtual RenderScene GetScene(const BASE_NS::string_view name) const = 0; 45 46 /** Get (default) scene. Returns the first scene. 47 * @return render scene. 48 */ 49 virtual RenderScene GetScene() const = 0; 50 51 protected: 52 IRenderDataStoreDefaultScene() = default; 53 }; 54 CORE3D_END_NAMESPACE() 55 56 #endif // API_3D_RENDER_IRENDER_DATA_STORE_DEFAULT_SCENE_H 57