Skip to main content

UiTransformComponent Class

Component for viewport-relative UI positioning. More...

Declaration

class helios::engine::modules::ui::transform::components::UiTransformComponent { ... }

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

boolisEnabled () const noexcept

Checks whether this component is enabled. More...

voidenable () noexcept

Enables this component. More...

voiddisable () noexcept

Disables this component. More...

voidsetAnchor (const helios::engine::modules::ui::layout::Anchor anchor) noexcept

Sets the anchor point. More...

helios::engine::modules::ui::layout::Anchoranchor () const noexcept

Returns the current anchor point. More...

voidsetViewportId (const helios::engine::common::types::ViewportId viewportId) noexcept

Sets the viewport ID. More...

voidsetOffsets (const helios::math::vec4f offsets) noexcept

Sets the offsets from the anchor point. More...

helios::math::vec4foffsets () const noexcept

Returns the current offsets. More...

voidsetPivot (const helios::engine::modules::ui::layout::Anchor pivot) noexcept

Sets the pivot point. More...

helios::engine::modules::ui::layout::Anchorpivot () const noexcept

Returns the current pivot point. More...

helios::engine::common::types::ViewportIdviewportId () const noexcept

Returns the viewport ID. More...

Private Member Attributes Index

helios::engine::modules::ui::layout::Anchoranchor_ {helios::engine::modules::ui::layout::Anchor::Center}

Anchor point relative to the viewport. More...

helios::engine::modules::ui::layout::Anchorpivot_ {helios::engine::modules::ui::layout::Anchor::Center}

Pivot point of this element for positioning calculations. More...

helios::engine::common::types::ViewportIdviewportId_ {helios::core::types::no_init}

ID of the viewport this element is positioned relative to. More...

helios::math::vec4foffsets_ {}

Offsets from anchor point (top, right, bottom, left). More...

boolisEnabled_ = 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()

helios::engine::modules::ui::transform::components::UiTransformComponent::UiTransformComponent ()
default

Default constructor.

Definition at line 88 of file UiTransformComponent.ixx.

Referenced by operator=, operator=, UiTransformComponent and UiTransformComponent.

UiTransformComponent()

helios::engine::modules::ui::transform::components::UiTransformComponent::UiTransformComponent (const UiTransformComponent &)
default

Copy constructor.

Definition at line 93 of file UiTransformComponent.ixx.

Reference UiTransformComponent.

UiTransformComponent()

helios::engine::modules::ui::transform::components::UiTransformComponent::UiTransformComponent (UiTransformComponent &&)
noexcept default

Move constructor.

Definition at line 103 of file UiTransformComponent.ixx.

Reference UiTransformComponent.

Public Operators

operator=()

UiTransformComponent & helios::engine::modules::ui::transform::components::UiTransformComponent::operator= (const UiTransformComponent &)
default

Copy assignment operator.

Definition at line 98 of file UiTransformComponent.ixx.

Reference UiTransformComponent.

operator=()

UiTransformComponent & helios::engine::modules::ui::transform::components::UiTransformComponent::operator= (UiTransformComponent &&)
noexcept default

Move assignment operator.

Definition at line 108 of file UiTransformComponent.ixx.

Reference UiTransformComponent.

Public Member Functions

anchor()

helios::engine::modules::ui::layout::Anchor helios::engine::modules::ui::transform::components::UiTransformComponent::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.

125 [[nodiscard]] helios::engine::modules::ui::layout::Anchor anchor() const noexcept {
126 return anchor_;
127 }

Referenced by setAnchor.

disable()

void helios::engine::modules::ui::transform::components::UiTransformComponent::disable ()
inline noexcept

Disables this component.

Definition at line 81 of file UiTransformComponent.ixx.

81 void disable() noexcept {
82 isEnabled_ = false;
83 }

enable()

void helios::engine::modules::ui::transform::components::UiTransformComponent::enable ()
inline noexcept

Enables this component.

Definition at line 74 of file UiTransformComponent.ixx.

74 void enable() noexcept {
75 isEnabled_ = true;
76 }

isEnabled()

bool helios::engine::modules::ui::transform::components::UiTransformComponent::isEnabled ()
inline nodiscard noexcept

Checks whether this component is enabled.

Returns

True if enabled, false otherwise.

Definition at line 67 of file UiTransformComponent.ixx.

67 [[nodiscard]] bool isEnabled() const noexcept {
68 return isEnabled_;
69 }

offsets()

helios::math::vec4f helios::engine::modules::ui::transform::components::UiTransformComponent::offsets ()
inline nodiscard noexcept

Returns the current offsets.

Returns

Offsets as vec4f (top, right, bottom, left).

Definition at line 152 of file UiTransformComponent.ixx.

152 [[nodiscard]] helios::math::vec4f offsets() const noexcept {
153 return offsets_;
154 }

Referenced by setOffsets.

pivot()

helios::engine::modules::ui::layout::Anchor helios::engine::modules::ui::transform::components::UiTransformComponent::pivot ()
inline nodiscard noexcept

Returns the current pivot point.

Returns

The pivot point of this element.

Definition at line 170 of file UiTransformComponent.ixx.

170 [[nodiscard]] helios::engine::modules::ui::layout::Anchor pivot() const noexcept {
171 return pivot_;
172 }

Referenced by setPivot.

setAnchor()

void helios::engine::modules::ui::transform::components::UiTransformComponent::setAnchor (const helios::engine::modules::ui::layout::Anchor anchor)
inline noexcept

Sets the anchor point.

Parameters
anchor

The anchor point relative to the viewport.

Definition at line 116 of file UiTransformComponent.ixx.

116 void setAnchor(const helios::engine::modules::ui::layout::Anchor anchor) noexcept {
117 anchor_ = anchor;
118 }

References anchor and setAnchor.

Referenced by setAnchor.

setOffsets()

void helios::engine::modules::ui::transform::components::UiTransformComponent::setOffsets (const helios::math::vec4f offsets)
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.

143 void setOffsets(const helios::math::vec4f offsets) noexcept {
144 offsets_ = offsets;
145 }

Reference offsets.

setPivot()

void helios::engine::modules::ui::transform::components::UiTransformComponent::setPivot (const helios::engine::modules::ui::layout::Anchor pivot)
inline noexcept

Sets the pivot point.

Parameters
pivot

The pivot point of this element.

Definition at line 161 of file UiTransformComponent.ixx.

162 pivot_ = pivot;
163 }

Reference pivot.

setViewportId()

void helios::engine::modules::ui::transform::components::UiTransformComponent::setViewportId (const helios::engine::common::types::ViewportId viewportId)
inline noexcept

Sets the viewport ID.

Parameters
viewportId

The ID of the viewport for positioning.

Definition at line 134 of file UiTransformComponent.ixx.

135 viewportId_ = viewportId;
136 }

Reference viewportId.

viewportId()

helios::engine::common::types::ViewportId helios::engine::modules::ui::transform::components::UiTransformComponent::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.

180 return viewportId_;
181 }

Referenced by setViewportId.

Private Member Attributes

anchor_

helios::engine::modules::ui::layout::Anchor helios::engine::modules::ui::transform::components::UiTransformComponent::anchor_ {helios::engine::modules::ui::layout::Anchor::Center}

Anchor point relative to the viewport.

Definition at line 38 of file UiTransformComponent.ixx.

isEnabled_

bool helios::engine::modules::ui::transform::components::UiTransformComponent::isEnabled_ = true

Whether this component is enabled.

Definition at line 58 of file UiTransformComponent.ixx.

58 bool isEnabled_ = true;

offsets_

helios::math::vec4f helios::engine::modules::ui::transform::components::UiTransformComponent::offsets_ {}

Offsets from anchor point (top, right, bottom, left).

Definition at line 53 of file UiTransformComponent.ixx.

53 helios::math::vec4f offsets_{};

pivot_

helios::engine::modules::ui::layout::Anchor helios::engine::modules::ui::transform::components::UiTransformComponent::pivot_ {helios::engine::modules::ui::layout::Anchor::Center}

Pivot point of this element for positioning calculations.

Definition at line 43 of file UiTransformComponent.ixx.

viewportId_

helios::engine::common::types::ViewportId helios::engine::modules::ui::transform::components::UiTransformComponent::viewportId_ {helios::core::types::no_init}

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.