ScaleSystem Class
System that applies scaling to entities based on their ScaleStateComponent. More...
Declaration
Base class
| class | System |
|
Abstract base class for game systems. More... | |
Public Member Functions Index
| void | init (helios::engine::runtime::world::GameWorld &gameWorld) noexcept override |
|
Called when the system is added to a GameWorld. More... | |
| void | update (helios::engine::runtime::world::UpdateContext &updateContext) noexcept override |
|
Updates scale for all entities with dirty ScaleComponents. More... | |
Description
System that applies scaling to entities based on their ScaleStateComponent.
This system converts the desired world-space dimensions from ScaleStateComponent into scale factors relative to the model's original AABB. It handles unit conversion (e.g., centimeters to meters) based on the ScaleStateComponent's unit.
Required components:
- ScaleStateComponent (desired dimensions and unit)
- ModelAabbComponent (original model bounds)
- ComposeTransformComponent (receives scale updates)
Definition at line 42 of file ScaleSystem.ixx.
Public Member Functions
init()
| inline noexcept virtual |
Called when the system is added to a GameWorld.
- Parameters
-
gameWorld Pointer to the GameWorld this system belongs to.
Definition at line 51 of file ScaleSystem.ixx.
update()
| inline noexcept virtual |
Updates scale for all entities with dirty ScaleComponents.
For each entity with the required components, calculates the scale factor needed to resize the model from its original dimensions to the desired world-space dimensions.
- Parameters
-
updateContext Context containing deltaTime and other frame data.
Definition at line 64 of file ScaleSystem.ixx.
References helios::core::units::from and helios::engine::ecs::System::gameWorld_.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.