ScaleSystem Class
System that applies scaling to entities based on their ScaleComponent. More...
Declaration
Base class
| class | System |
|
Abstract base class for game systems. More... | |
Public Member Functions Index
| void | onAdd (helios::engine::game::GameWorld *gameWorld) noexcept override |
| void | update (helios::engine::game::UpdateContext &updateContext) noexcept override |
|
Updates scale for all entities with dirty ScaleComponents. More... | |
Description
System that applies scaling to entities based on their ScaleComponent.
This system converts the desired world-space dimensions from ScaleComponent into scale factors relative to the model's original AABB. It handles unit conversion (e.g., centimeters to meters) based on the ScaleComponent's unit.
Required components:
- ScaleComponent (desired dimensions and unit)
- ModelAabbComponent (original model bounds)
- TransformComponent (receives scale updates)
Definition at line 40 of file ScaleSystem.ixx.
Public Member Functions
onAdd()
| 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 49 of file ScaleSystem.ixx.
Reference helios::engine::game::System::onAdd.
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 62 of file ScaleSystem.ixx.
References helios::core::units::from and helios::engine::game::System::gameWorld_.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.