Skip to main content

ActiveViewportIdsStateComponent.ixx File

Component storing active viewport IDs for state-based rendering. More...

Included Headers

Namespaces Index

namespacehelios
namespaceengine

Main engine module aggregating core infrastructure and game systems. More...

namespacemodules

Domain-specific components and systems. More...

namespacerendering

Rendering components for game entities. More...

namespaceviewport

State-based viewport management for conditional rendering. More...

namespacecomponents

Components for viewport state management. More...

Classes Index

classActiveViewportIdsStateComponent

Stores the currently active viewport IDs based on game/match state. More...

Description

Component storing active viewport IDs for state-based rendering.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file ActiveViewportIdsStateComponent.ixx
3 * @brief Component storing active viewport IDs for state-based rendering.
4 */
5module;
6
7#include <vector>
8#include <span>
9
10export module helios.engine.modules.rendering.viewport.components.ActiveViewportIdsStateComponent;
11
12import helios.engine.ecs.EntityHandle;
13import helios.engine.common.types.ViewportId;
14
15import helios.engine.mechanics.gamestate.types;
16import helios.engine.mechanics.match.types;
17
21
23
24 /**
25 * @brief Stores the currently active viewport IDs based on game/match state.
26 *
27 * @details This component maintains a list of ViewportIds that should be
28 * rendered for the current game and match state combination. It is updated
29 * by StateToViewportPolicyUpdateSystem each frame based on the configured
30 * StateToViewportPolicy.
31 */
33
34 /**
35 * @brief Currently active viewport identifiers.
36 */
37 mutable std::vector<ViewportId> viewportIds_;
38
39
40 public:
41
42 /**
43 * @brief Replaces the current viewport IDs with the provided list.
44 *
45 * @param viewportIds The new list of active viewport IDs.
46 */
47 void setViewportIds(std::span<const ViewportId>& viewportIds) {
48 viewportIds_.assign(viewportIds.begin(), viewportIds.end());
49 }
50
51 /**
52 * @brief Returns a span over all active viewport IDs.
53 *
54 * @return Read-only span of viewport identifiers.
55 */
56 [[nodiscard]] std::span<const ViewportId> viewportIds() const noexcept {
57 return viewportIds_;
58 }
59
60 /**
61 * @brief Clears all active viewport IDs.
62 */
63 void clear() const noexcept {
64 viewportIds_.clear();
65 }
66
67 };
68
69}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.