Skip to main content

Level.ixx File

Defines the Level class representing a game level or stage. More...

Included Headers

Namespaces Index

namespacehelios
namespaceengine

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

namespaceruntime

Runtime infrastructure for game execution and lifecycle orchestration. More...

namespaceworld

World state management, resource registry, and per-frame update context. More...

Classes Index

classLevel

Represents a game level containing the scene graph and world boundaries. More...

Description

Defines the Level class representing a game level or stage.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file Level.ixx
3 * @brief Defines the Level class representing a game level or stage.
4 */
5module;
6
7export module helios.engine.runtime.world.Level;
8
9import helios.math.types;
10import helios.core.units.Unit;
11import helios.scene.SceneNode;
12
13
14export namespace helios::engine::runtime::world {
15
16 /**
17 * @brief Represents a game level containing the scene graph and world boundaries.
18 *
19 * @details The Level class acts as a container for the scene hierarchy (via a root node)
20 * and defines the spatial limits of the game world. It handles unit conversion for
21 * boundaries to ensure consistent internal representation (meters).
22 */
23 class Level {
24
25 /**
26 * @brief The root node of the scene graph associated with this level.
27 */
28 helios::scene::SceneNode* rootNode_ = nullptr;
29
30 /**
31 * @brief The spatial boundaries of the level in engine units (meters).
32 */
34 public:
35
36 /**
37 * @brief Constructs a new Level with a specific root scene node.
38 *
39 * @param rootNode Pointer to the root node of the scene graph for this level.
40 * The Level does not take ownership of this pointer.
41 */
43
44 /**
45 * @brief Sets the spatial boundaries of the level.
46 *
47 * @details Converts the provided bounds from the specified unit to the engine's
48 * standard unit (meters) before storing them.
49 *
50 * @param bounds The axis-aligned bounding box defining the level limits.
51 * @param unit The unit of measurement for the provided bounds (defaults to Meter).
52 */
56
57 bounds_ = helios::core::units::from(bounds, unit);
58
59 }
60
61 /**
62 * @brief Retrieves the root scene node of the level.
63 *
64 * @return Pointer to the root SceneNode.
65 */
66 [[nodiscard]] helios::scene::SceneNode* rootNode() const noexcept {
67 return rootNode_;
68 }
69
70 /**
71 * @brief Retrieves the level boundaries in engine units (meters).
72 *
73 * @return The axis-aligned bounding box of the level.
74 */
75 [[nodiscard]] const helios::math::aabbf& bounds() const noexcept {
76 return bounds_;
77 }
78
79 };
80
81}
82
83

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.