UiTransformSystem.ixx File
System for computing UI element screen positions. More...
Included Headers
#include <cassert>
#include <utility>
#include <helios.engine.common.tags.SystemRole>
#include <helios.math>
#include <helios.engine.mechanics.lifecycle.components.Active>
#include <helios.engine.modules.rendering.model.components.ModelAabbComponent>
#include <helios.engine.modules.scene.components.SceneNodeComponent>
#include <helios.engine.modules.spatial.transform.components.ComposeTransformComponent>
#include <helios.engine.ecs.components.HierarchyComponent>
#include <helios.engine.runtime.world.GameWorld>
#include <helios.engine.runtime.world.UpdateContext>
#include <helios.engine.modules.ui.layout.Anchor>
#include <helios.engine.modules.spatial.transform.components.TranslationStateComponent>
#include <helios.engine.modules.ui.transform.components.UiTransformComponent>
Namespaces Index
| namespace | helios |
| namespace | engine |
|
Main engine module aggregating core infrastructure and game systems. More... | |
| namespace | modules |
|
Domain-specific components and systems. More... | |
| namespace | ui |
|
User interface components and systems for game entities. More... | |
| namespace | transform |
|
UI transform components and positioning systems. More... | |
| namespace | systems |
|
UI positioning systems. More... | |
Classes Index
| class | UiTransformSystem |
|
Computes screen positions for UI elements based on layout configuration. More... | |
Description
System for computing UI element screen positions.
File Listing
The file content with the documentation metadata removed is:
34export namespace helios::engine::modules::ui::transform::systems {
70 class UiTransformSystem {
85 helios::math::vec3f anchor(
86 const helios::math::vec3f unanchored,
87 helios::math::vec3f size,
88 const helios::engine::modules::ui::layout::Anchor pivot) {
99 return unanchored.withY(unanchored[1] - size[1]);
128 void update(helios::engine::runtime::world::UpdateContext& updateContext) noexcept {
155 auto uiRect = helios::math::vec4f(
159 auto worldRect = helios::math::vec4f(
166 auto parentUiRect = helios::math::vec4f{};
167 auto parentWorldRect = helios::math::vec4f{};
175 parentUiRect = helios::math::vec4f(0, 0, viewportWidth, viewportHeight);
177 parentWorldRect = helios::math::vec4f(
186 auto* hc = entity.get<helios::engine::ecs::components::HierarchyComponent>();
194 auto* pmaabbcc = parentGo->get<rendering::model::components::ModelAabbComponent>();
195 auto* pctc = parentGo->get<spatial::transform::components::ComposeTransformComponent>();
199 parentUiRect = helios::math::vec4f(
212 auto anchored = helios::math::vec3f(
222 auto anchored = helios::math::vec3f(
233 auto anchored = helios::math::vec3f(
244 auto anchored = helios::math::vec3f(
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.