Skip to main content

EngineWorld Class

Aggregate runtime world for game objects, platform entities, and rendering domains. More...

Declaration

class helios::engine::runtime::world::EngineWorld { ... }

Public Member Functions Index

GameObjectWorld &gameObjectWorld ()
PlatformWorld &platformWorld ()
RenderResourceWorld &renderResourceWorld ()
RenderTargetWorld &renderTargetWorld ()
template <typename THandle>
autoclone (THandle source) noexcept
template <typename THandle>
autofind (THandle handle) noexcept
template <typename THandle>
autoadd (typename THandle::StrongId_type strongId=typename THandle::StrongId_type{})
template <typename THandle, typename... TComponents>
autoview ()
template <typename THandle>
autodestroy (const THandle handle)

Private Member Attributes Index

GameObjectWorldgameObjectWorld_ {}
RenderResourceWorldrenderResourceWorld_ {}
PlatformWorldplatformWorld_ {}
RenderTargetWorldrenderTargetWorld_ {}

Description

Aggregate runtime world for game objects, platform entities, and rendering domains.

Definition at line 106 of file EngineWorld.ixx.

Public Member Functions

add()

template <typename THandle>
auto helios::engine::runtime::world::EngineWorld::add (typename THandle::StrongId_type strongId=typename THandle::StrongId_type{})
inline

Definition at line 164 of file EngineWorld.ixx.

164 [[nodiscard]] auto add(typename THandle::StrongId_type strongId = typename THandle::StrongId_type{}) {
165 if constexpr(IsGameplaySystemHandle<THandle>) {
166 return gameObjectWorld_.addEntity<THandle>(strongId);
167 } else if constexpr(IsAnyPlatformHandle<THandle>) {
168 return platformWorld_.addEntity<THandle>(strongId);
169 } else if constexpr(IsRenderResourceHandle<THandle>) {
170 return renderResourceWorld_.addEntity<THandle>(strongId);
171 } else if constexpr(IsRenderTargetHandle<THandle>) {
172 return renderTargetWorld_.addEntity<THandle>(strongId);
173 } else {
174 static_assert(typed_false<THandle>, "Unsupported handle type for adding");
175 }
176 }

clone()

template <typename THandle>
auto helios::engine::runtime::world::EngineWorld::clone (THandle source)
inline noexcept

Definition at line 132 of file EngineWorld.ixx.

132 [[nodiscard]] auto clone(THandle source) noexcept {
133
134 if constexpr(IsGameplaySystemHandle<THandle>) {
135 return gameObjectWorld_.cloneEntity<THandle>(source);
136 } else if constexpr(IsAnyPlatformHandle<THandle>){
137 return platformWorld_.cloneEntity<THandle>(source);
138 } else if constexpr(IsRenderResourceHandle<THandle>) {
139 return renderResourceWorld_.cloneEntity<THandle>(source);
140 } else if constexpr(IsRenderTargetHandle<THandle>) {
141 return renderTargetWorld_.cloneEntity<THandle>(source);
142 } else {
143 static_assert(typed_false<THandle>, "Unsupported handle type for cloning");
144 }
145 }

Reference helios::engine::runtime::registerComponents.

destroy()

template <typename THandle>
auto helios::engine::runtime::world::EngineWorld::destroy (const THandle handle)
inline

Definition at line 196 of file EngineWorld.ixx.

196 [[nodiscard]] auto destroy(const THandle handle) {
197 if constexpr(IsGameplaySystemHandle<THandle>) {
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);
205 } else {
206 static_assert(typed_false<THandle>, "Unsupported handle type for destroying");
207 }
208
209 }

Reference helios::engine::runtime::registerComponents.

find()

template <typename THandle>
auto helios::engine::runtime::world::EngineWorld::find (THandle handle)
inline noexcept

Definition at line 149 of file EngineWorld.ixx.

149 [[nodiscard]] auto find(THandle handle) noexcept {
150 if constexpr(IsGameplaySystemHandle<THandle>) {
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);
158 } else {
159 static_assert(typed_false<THandle>, "Unsupported handle type for searching");
160 }
161 }

Reference helios::engine::runtime::registerComponents.

Referenced by helios::engine::runtime::pooling::EntityPoolManager< TEntity >::acquire and helios::engine::runtime::pooling::EntityPoolManager< TEntity >::release.

gameObjectWorld()

GameObjectWorld & helios::engine::runtime::world::EngineWorld::gameObjectWorld ()
inline

Definition at line 115 of file EngineWorld.ixx.

116 return gameObjectWorld_;
117 }

Referenced by helios::engine::runtime::world::GameWorld::gameObjectWorld.

platformWorld()

PlatformWorld & helios::engine::runtime::world::EngineWorld::platformWorld ()
inline

Definition at line 119 of file EngineWorld.ixx.

120 return platformWorld_;
121 }

Referenced by helios::engine::runtime::world::GameWorld::platformWorld.

renderResourceWorld()

RenderResourceWorld & helios::engine::runtime::world::EngineWorld::renderResourceWorld ()
inline

Definition at line 123 of file EngineWorld.ixx.

124 return renderResourceWorld_;
125 }

Referenced by helios::engine::runtime::world::GameWorld::renderResourceWorld.

renderTargetWorld()

RenderTargetWorld & helios::engine::runtime::world::EngineWorld::renderTargetWorld ()
inline

Definition at line 127 of file EngineWorld.ixx.

128 return renderTargetWorld_;
129 }

Referenced by helios::engine::runtime::world::GameWorld::renderTargetWorld.

view()

template <typename THandle, typename... TComponents>
auto helios::engine::runtime::world::EngineWorld::view ()
inline

Definition at line 180 of file EngineWorld.ixx.

180 [[nodiscard]] auto view() {
181 if constexpr(IsGameplaySystemHandle<THandle>) {
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...>();
189 } else {
190 static_assert(typed_false<THandle>, "Unsupported handle type for viewing");
191 }
192
193 }

References helios::engine::runtime::registerComponents and view.

Referenced by helios::engine::runtime::pooling::EntityPoolManager< TEntity >::init, view, helios::engine::runtime::world::GameWorld::view and helios::engine::runtime::world::UpdateContext::view.

Private Member Attributes

gameObjectWorld_

GameObjectWorld helios::engine::runtime::world::EngineWorld::gameObjectWorld_ {}

Definition at line 108 of file EngineWorld.ixx.

108 GameObjectWorld gameObjectWorld_{};

platformWorld_

PlatformWorld helios::engine::runtime::world::EngineWorld::platformWorld_ {}

Definition at line 110 of file EngineWorld.ixx.

110 PlatformWorld platformWorld_{};

renderResourceWorld_

RenderResourceWorld helios::engine::runtime::world::EngineWorld::renderResourceWorld_ {}

Definition at line 109 of file EngineWorld.ixx.

109 RenderResourceWorld renderResourceWorld_{};

renderTargetWorld_

RenderTargetWorld helios::engine::runtime::world::EngineWorld::renderTargetWorld_ {}

Definition at line 111 of file EngineWorld.ixx.

111 RenderTargetWorld renderTargetWorld_{};

The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.