UiTransformComponent Class
Component for viewport-relative UI positioning. More...
Declaration
Public Constructors Index
| UiTransformComponent ()=default | |
|
Default constructor. More... | |
| UiTransformComponent (const UiTransformComponent &)=default | |
|
Copy constructor. More... | |
| UiTransformComponent (UiTransformComponent &&) noexcept=default | |
|
Move constructor. More... | |
Public Operators Index
| UiTransformComponent & | operator= (const UiTransformComponent &)=default |
|
Copy assignment operator. More... | |
| UiTransformComponent & | operator= (UiTransformComponent &&) noexcept=default |
|
Move assignment operator. More... | |
Public Member Functions Index
| bool | isEnabled () const noexcept |
|
Checks whether this component is enabled. More... | |
| void | enable () noexcept |
|
Enables this component. More... | |
| void | disable () noexcept |
|
Disables this component. More... | |
| void | setAnchor (const helios::engine::modules::ui::layout::Anchor anchor) noexcept |
|
Sets the anchor point. More... | |
| helios::engine::modules::ui::layout::Anchor | anchor () const noexcept |
|
Returns the current anchor point. More... | |
| void | setViewportId (const helios::engine::common::types::ViewportId viewportId) noexcept |
|
Sets the viewport ID. More... | |
| void | setOffsets (const helios::math::vec4f offsets) noexcept |
|
Sets the offsets from the anchor point. More... | |
| helios::math::vec4f | offsets () const noexcept |
|
Returns the current offsets. More... | |
| void | setPivot (const helios::engine::modules::ui::layout::Anchor pivot) noexcept |
|
Sets the pivot point. More... | |
| helios::engine::modules::ui::layout::Anchor | pivot () const noexcept |
|
Returns the current pivot point. More... | |
| helios::engine::common::types::ViewportId | viewportId () const noexcept |
|
Returns the viewport ID. More... | |
Private Member Attributes Index
| helios::engine::modules::ui::layout::Anchor | anchor_ {helios::engine::modules::ui::layout::Anchor::Center} |
|
Anchor point relative to the viewport. More... | |
| helios::engine::modules::ui::layout::Anchor | pivot_ {helios::engine::modules::ui::layout::Anchor::Center} |
|
Pivot point of this element for positioning calculations. More... | |
| helios::engine::common::types::ViewportId | viewportId_ {helios::core::types::no_init} |
|
ID of the viewport this element is positioned relative to. More... | |
| helios::math::vec4f | offsets_ {} |
|
Offsets from anchor point (top, right, bottom, left). More... | |
| bool | isEnabled_ = true |
|
Whether this component is enabled. More... | |
Description
Component for viewport-relative UI positioning.
Stores positioning parameters for UI elements including anchor point, pivot point, offsets, and the target viewport. Used by UiTransformSystem to compute screen positions.
Definition at line 33 of file UiTransformComponent.ixx.
Public Constructors
UiTransformComponent()
| default |
Default constructor.
Definition at line 88 of file UiTransformComponent.ixx.
Referenced by operator=, operator=, UiTransformComponent and UiTransformComponent.
UiTransformComponent()
| default |
Copy constructor.
Definition at line 93 of file UiTransformComponent.ixx.
Reference UiTransformComponent.
UiTransformComponent()
| noexcept default |
Move constructor.
Definition at line 103 of file UiTransformComponent.ixx.
Reference UiTransformComponent.
Public Operators
operator=()
| default |
Copy assignment operator.
Definition at line 98 of file UiTransformComponent.ixx.
Reference UiTransformComponent.
operator=()
| noexcept default |
Move assignment operator.
Definition at line 108 of file UiTransformComponent.ixx.
Reference UiTransformComponent.
Public Member Functions
anchor()
| inline nodiscard noexcept |
Returns the current anchor point.
- Returns
The anchor point relative to the viewport.
Definition at line 125 of file UiTransformComponent.ixx.
Referenced by setAnchor.
disable()
| inline noexcept |
Disables this component.
Definition at line 81 of file UiTransformComponent.ixx.
enable()
| inline noexcept |
Enables this component.
Definition at line 74 of file UiTransformComponent.ixx.
isEnabled()
| inline nodiscard noexcept |
Checks whether this component is enabled.
- Returns
True if enabled, false otherwise.
Definition at line 67 of file UiTransformComponent.ixx.
offsets()
| inline nodiscard noexcept |
Returns the current offsets.
- Returns
Offsets as vec4f (top, right, bottom, left).
Definition at line 152 of file UiTransformComponent.ixx.
Referenced by setOffsets.
pivot()
| inline nodiscard noexcept |
Returns the current pivot point.
- Returns
The pivot point of this element.
Definition at line 170 of file UiTransformComponent.ixx.
Referenced by setPivot.
setAnchor()
| inline noexcept |
setOffsets()
| inline noexcept |
Sets the offsets from the anchor point.
- Parameters
-
offsets Offsets as vec4f (top, right, bottom, left).
Definition at line 143 of file UiTransformComponent.ixx.
Reference offsets.
setPivot()
| inline noexcept |
Sets the pivot point.
- Parameters
-
pivot The pivot point of this element.
Definition at line 161 of file UiTransformComponent.ixx.
Reference pivot.
setViewportId()
| inline noexcept |
Sets the viewport ID.
- Parameters
-
viewportId The ID of the viewport for positioning.
Definition at line 134 of file UiTransformComponent.ixx.
Reference viewportId.
viewportId()
| inline nodiscard noexcept |
Returns the viewport ID.
- Returns
The ID of the viewport this element is positioned relative to.
Definition at line 179 of file UiTransformComponent.ixx.
Referenced by setViewportId.
Private Member Attributes
anchor_
|
Anchor point relative to the viewport.
Definition at line 38 of file UiTransformComponent.ixx.
isEnabled_
|
Whether this component is enabled.
Definition at line 58 of file UiTransformComponent.ixx.
offsets_
|
Offsets from anchor point (top, right, bottom, left).
Definition at line 53 of file UiTransformComponent.ixx.
pivot_
|
Pivot point of this element for positioning calculations.
Definition at line 43 of file UiTransformComponent.ixx.
viewportId_
|
ID of the viewport this element is positioned relative to.
Definition at line 48 of file UiTransformComponent.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.