EngineWorld.ixx File
Aggregate world that routes typed handles to their domain-specific TypedHandleWorld. More...
Included Headers
#include <imgui_internal.h>
#include <tuple>
#include <type_traits>
#include <helios.engine.rendering.viewport.ViewportEntityManager>
#include <helios.engine.scene.SceneEntityManager>
#include <helios.engine.platform.window.concepts>
#include <helios.engine.scene.concepts>
#include <helios.engine.runtime.world.types.GameObjectHandle>
#include <helios.ecs>
#include <helios.engine.runtime.world.GameObjectEntityManager>
#include <helios.engine.rendering.common.concepts>
#include <helios.engine.rendering.common.concepts.IsRenderResourceHandle>
#include <helios.engine.rendering.mesh.MeshEntityManager>
#include <helios.engine.platform.window.types>
#include <helios.engine.platform.environment.PlatformEntityManager>
#include <helios.engine.core.TypedTupleCat>
#include <helios.engine.platform.environment.types>
#include <helios.engine.platform.concepts>
#include <helios.engine.platform.window.WindowEntityManager>
#include <helios.engine.rendering.shader.ShaderEntityManager>
#include <helios.engine.rendering.renderTarget.RenderTargetEntityManager>
#include <helios.engine.rendering.material.MaterialEntityManager>
#include <helios.engine.runtime.world.concepts.IsGameObjectHandle>
Namespaces Index
| namespace | helios |
| namespace | engine |
| namespace | runtime |
| namespace | world |
Classes Index
| class | EngineWorld |
|
Aggregate runtime world for game objects, platform entities, and rendering domains. More... | |
Variables Index
template <typename T> | |
| constexpr bool | typed_false = false |
Description
Aggregate world that routes typed handles to their domain-specific TypedHandleWorld.
Variables
typed_false
template <typename T>
| constexpr |
Definition at line 66 of file EngineWorld.ixx.
66inline constexpr bool typed_false = false;
File Listing
The file content with the documentation metadata removed is:
48using namespace helios::engine::platform::environment;
49using namespace helios::engine::platform::environment::types;
51using namespace helios::engine::platform::window;
52using namespace helios::engine::platform::window::types;
54using namespace helios::engine::runtime::world::types;
56using namespace helios::engine::rendering::shader;
57using namespace helios::engine::rendering::material;
58using namespace helios::engine::rendering::mesh;
60using namespace helios::engine::rendering::renderTarget;
61using namespace helios::engine::rendering::viewport;
62using namespace helios::engine::scene;
66inline constexpr bool typed_false = false;
69concept IsGameplaySystemHandle = IsGameObjectHandle<T> || helios::engine::scene::concepts::IsSceneHandle<T>;
71export namespace helios::engine::runtime::world {
81 using RenderResourceWorld = TypedHandleWorld<ShaderEntityManager, MaterialEntityManager, MeshEntityManager>;
106 class EngineWorld {
108 GameObjectWorld gameObjectWorld_{};
109 RenderResourceWorld renderResourceWorld_{};
110 PlatformWorld platformWorld_{};
111 RenderTargetWorld renderTargetWorld_{};
115 [[nodiscard]] GameObjectWorld& gameObjectWorld() {
119 [[nodiscard]] PlatformWorld& platformWorld() {
127 [[nodiscard]] RenderTargetWorld& renderTargetWorld() {
136 } else if constexpr(IsAnyPlatformHandle<THandle>){
138 } else if constexpr(IsRenderResourceHandle<THandle>) {
140 } else if constexpr(IsRenderTargetHandle<THandle>) {
143 static_assert(typed_false<THandle>, "Unsupported handle type for cloning");
151 return gameObjectWorld_.findEntity<THandle>(handle);
152 } else if constexpr(IsAnyPlatformHandle<THandle>) {
153 return platformWorld_.findEntity<THandle>(handle);
154 } else if constexpr(IsRenderResourceHandle<THandle>) {
155 return renderResourceWorld_.findEntity<THandle>(handle);
156 } else if constexpr(IsRenderTargetHandle<THandle>) {
157 return renderTargetWorld_.findEntity<THandle>(handle);
159 static_assert(typed_false<THandle>, "Unsupported handle type for searching");
164 [[nodiscard]] auto add(typename THandle::StrongId_type strongId = typename THandle::StrongId_type{}) {
167 } else if constexpr(IsAnyPlatformHandle<THandle>) {
169 } else if constexpr(IsRenderResourceHandle<THandle>) {
171 } else if constexpr(IsRenderTargetHandle<THandle>) {
174 static_assert(typed_false<THandle>, "Unsupported handle type for adding");
179 template<typename THandle, typename... TComponents>
182 return gameObjectWorld_.template view<THandle, TComponents...>();
183 } else if constexpr(IsAnyPlatformHandle<THandle>) {
184 return platformWorld_.template view<THandle, TComponents...>();
185 } else if constexpr(IsRenderResourceHandle<THandle>) {
186 return renderResourceWorld_.template view<THandle, TComponents...>();
187 } else if constexpr(IsRenderTargetHandle<THandle>) {
188 return renderTargetWorld_.template view<THandle, TComponents...>();
190 static_assert(typed_false<THandle>, "Unsupported handle type for viewing");
198 return gameObjectWorld_.destroy<THandle>(handle);
199 } else if constexpr(IsAnyPlatformHandle<THandle>) {
200 return platformWorld_.destroy<THandle>(handle);
201 } else if constexpr(IsRenderResourceHandle<THandle>) {
202 return renderResourceWorld_.destroy<THandle>(handle);
203 } else if constexpr(IsRenderTargetHandle<THandle>) {
204 return renderTargetWorld_.destroy<THandle>(handle);
206 static_assert(typed_false<THandle>, "Unsupported handle type for destroying");
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.