Skip to main content

Level Class

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

Declaration

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

Public Constructors Index

Level (helios::scene::SceneNode *rootNode)

Constructs a new Level with a specific root scene node. More...

Public Member Functions Index

voidsetBounds (const helios::math::aabbf &bounds, const helios::core::units::Unit unit=helios::core::units::Unit::Meter) noexcept

Sets the spatial boundaries of the level. More...

helios::scene::SceneNode *rootNode () const noexcept

Retrieves the root scene node of the level. More...

const helios::math::aabbf &bounds () const noexcept

Retrieves the level boundaries in engine units (meters). More...

Private Member Attributes Index

helios::scene::SceneNode *rootNode_ = nullptr

The root node of the scene graph associated with this level. More...

helios::math::aabbfbounds_

The spatial boundaries of the level in engine units (meters). More...

Description

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

The Level class acts as a container for the scene hierarchy (via a root node) and defines the spatial limits of the game world. It handles unit conversion for boundaries to ensure consistent internal representation (meters).

Definition at line 23 of file Level.ixx.

Public Constructors

Level()

helios::engine::runtime::world::Level::Level (helios::scene::SceneNode * rootNode)
inline explicit

Constructs a new Level with a specific root scene node.

Parameters
rootNode

Pointer to the root node of the scene graph for this level. The Level does not take ownership of this pointer.

Definition at line 42 of file Level.ixx.

Reference rootNode.

Public Member Functions

bounds()

const helios::math::aabbf & helios::engine::runtime::world::Level::bounds ()
inline nodiscard noexcept

Retrieves the level boundaries in engine units (meters).

Returns

The axis-aligned bounding box of the level.

Definition at line 75 of file Level.ixx.

75 [[nodiscard]] const helios::math::aabbf& bounds() const noexcept {
76 return bounds_;
77 }

Referenced by setBounds.

rootNode()

helios::scene::SceneNode * helios::engine::runtime::world::Level::rootNode ()
inline nodiscard noexcept

Retrieves the root scene node of the level.

Returns

Pointer to the root SceneNode.

Definition at line 66 of file Level.ixx.

66 [[nodiscard]] helios::scene::SceneNode* rootNode() const noexcept {
67 return rootNode_;
68 }

Referenced by Level.

setBounds()

void helios::engine::runtime::world::Level::setBounds (const helios::math::aabbf & bounds, const helios::core::units::Unit unit=helios::core::units::Unit::Meter)
inline noexcept

Sets the spatial boundaries of the level.

Converts the provided bounds from the specified unit to the engine's standard unit (meters) before storing them.

Parameters
bounds

The axis-aligned bounding box defining the level limits.

unit

The unit of measurement for the provided bounds (defaults to Meter).

Definition at line 53 of file Level.ixx.

56
57 bounds_ = helios::core::units::from(bounds, unit);
58
59 }

References bounds, helios::core::units::from and helios::core::units::Meter.

Private Member Attributes

bounds_

helios::math::aabbf helios::engine::runtime::world::Level::bounds_

The spatial boundaries of the level in engine units (meters).

Definition at line 33 of file Level.ixx.

rootNode_

helios::scene::SceneNode* helios::engine::runtime::world::Level::rootNode_ = nullptr

The root node of the scene graph associated with this level.

Definition at line 28 of file Level.ixx.

28 helios::scene::SceneNode* rootNode_ = nullptr;

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.