StateToViewportPolicyUpdateSystem.ixx File
System that updates active viewports based on game/match state. More...
Included Headers
#include <cassert>
#include <vector>
#include <helios.engine.rendering.viewport.types.ViewportHandle>
#include <helios.engine.state.StateToIdMapPair>
#include <helios.engine.runtime.world.tags.SystemRole>
#include <helios.engine.runtime.world.UpdateContext>
#include <helios.engine.runtime.world.Session>
#include <helios.engine.runtime.world.GameWorld>
Namespaces Index
| namespace | helios |
| namespace | engine |
| namespace | rendering |
| namespace | viewport |
| namespace | systems |
Classes Index
| class | StateToViewportPolicyUpdateSystem<StateLft, StateRgt> |
|
Updates the session's active viewport list based on state policy. More... | |
Description
System that updates active viewports based on game/match state.
File Listing
The file content with the documentation metadata removed is:
22using namespace helios::engine::state;
23using namespace helios::engine::rendering::viewport::types;
24export namespace helios::engine::rendering::viewport::systems {
56 class StateToViewportPolicyUpdateSystem {
61 StateToIdMapPair<StateLft, StateRgt, ViewportHandle> stateToIdMapPair_;
72 explicit StateToViewportPolicyUpdateSystem(StateToIdMapPair<StateLft, StateRgt, ViewportHandle> stateToIdMapPair)
73 : stateToIdMapPair_(std::move(stateToIdMapPair)){}
83 void update(helios::engine::runtime::world::UpdateContext& updateContext) noexcept {
85 auto& session = updateContext.session();
88 auto matchState = session.state<StateRgt>();
92 auto viewportIds = stateToIdMapPair_.ids(gameState, matchState);
93 session.setViewportHandles(viewportIds);
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.