Skip to main content

Vec4Component Class Template

Generic 4D value component with dirty-state tracking. More...

Declaration

template <typename TDomainTag, typename THandle, typename TNumericType> class helios::engine::core::components::Vec4Component<TDomainTag, THandle, TNumericType> { ... }

Public Constructors Index

template <typename TDomainTag, typename THandle, typename TNumericType>
Vec4Component ()=default
template <typename TDomainTag, typename THandle, typename TNumericType>
Vec4Component (const vec4< TNumericType > value)

Constructs the component with an initial value. More...

template <typename TDomainTag, typename THandle, typename TNumericType>
Vec4Component (const TNumericType x, const TNumericType y, const TNumericType z, const TNumericType w)

Constructs the component from scalar vector coordinates. More...

template <typename TDomainTag, typename THandle, typename TNumericType>
Vec4Component (const Vec4Component &other)

Copy constructor. More...

template <typename TDomainTag, typename THandle, typename TNumericType>
Vec4Component (Vec4Component &&) noexcept=default

Default move constructor. More...

Public Operators Index

template <typename TDomainTag, typename THandle, typename TNumericType>
Vec4Component &operator= (const Vec4Component &)=default

Default copy assignment. More...

template <typename TDomainTag, typename THandle, typename TNumericType>
Vec4Component &operator= (Vec4Component &&) noexcept=default

Default move assignment. More...

Public Member Functions Index

template <typename TDomainTag, typename THandle, typename TNumericType>
voidonAcquire () noexcept

Lifecycle hook called when the component is acquired. More...

template <typename TDomainTag, typename THandle, typename TNumericType>
voidonRelease () noexcept

Lifecycle hook called when the component is released. More...

template <typename TDomainTag, typename THandle, typename TNumericType>
voidclearDirty () noexcept

Clears the dirty flag after dependent systems consumed updates. More...

template <typename TDomainTag, typename THandle, typename TNumericType>
boolisDirty () const noexcept

Returns whether the component requires a refresh pass. More...

template <typename TDomainTag, typename THandle, typename TNumericType>
auto value () const noexcept -> vec4< TNumericType >

Returns the current value. More...

template <typename TDomainTag, typename THandle, typename TNumericType>
auto value () noexcept -> vec4< TNumericType >

Returns the current value. More...

template <typename TDomainTag, typename THandle, typename TNumericType>
voidsetValue (const vec4< TNumericType > value) noexcept

Updates the value and marks the component dirty on change. More...

Private Member Attributes Index

template <typename TDomainTag, typename THandle, typename TNumericType>
helios::math::vec4< TNumericType >value_ {}
template <typename TDomainTag, typename THandle, typename TNumericType>
boolisDirty_ = true

Description

Generic 4D value component with dirty-state tracking.

Template Parameters
TDomainTag

Semantic domain tag.

THandle

Owning entity handle type.

TNumericType

Scalar type for vector values.

Definition at line 28 of file Vec4Component.ixx.

Public Constructors

Vec4Component()

template <typename TDomainTag, typename THandle, typename TNumericType>
helios::engine::core::components::Vec4Component< TDomainTag, THandle, TNumericType >::Vec4Component ()
default

Definition at line 36 of file Vec4Component.ixx.

Vec4Component()

template <typename TDomainTag, typename THandle, typename TNumericType>
helios::engine::core::components::Vec4Component< TDomainTag, THandle, TNumericType >::Vec4Component (const vec4< TNumericType > value)
inline explicit

Constructs the component with an initial value.

Parameters
value

Initial value vector.

Definition at line 43 of file Vec4Component.ixx.

43 explicit Vec4Component(const vec4<TNumericType> value) : value_(value){}

Vec4Component()

template <typename TDomainTag, typename THandle, typename TNumericType>
helios::engine::core::components::Vec4Component< TDomainTag, THandle, TNumericType >::Vec4Component (const TNumericType x, const TNumericType y, const TNumericType z, const TNumericType w)
inline explicit

Constructs the component from scalar vector coordinates.

Parameters
x

X component.

y

Y component.

z

Z component.

w

W component.

Definition at line 53 of file Vec4Component.ixx.

53 explicit Vec4Component(
54 const TNumericType x, const TNumericType y, const TNumericType z, const TNumericType w)
55 : value_(x, y, z, w){}

Vec4Component()

template <typename TDomainTag, typename THandle, typename TNumericType>
helios::engine::core::components::Vec4Component< TDomainTag, THandle, TNumericType >::Vec4Component (const Vec4Component & other)
inline

Copy constructor.

Copies the value and forces the copied component into a dirty state to ensure dependent systems refresh cached data.

Parameters
other

The component to copy from.

Definition at line 65 of file Vec4Component.ixx.

66 value_(other.value_),
67 isDirty_(true) {}

Vec4Component()

template <typename TDomainTag, typename THandle, typename TNumericType>
helios::engine::core::components::Vec4Component< TDomainTag, THandle, TNumericType >::Vec4Component (Vec4Component &&)
noexcept default

Default move constructor.

Definition at line 72 of file Vec4Component.ixx.

Public Operators

operator=()

template <typename TDomainTag, typename THandle, typename TNumericType>
Vec4Component & helios::engine::core::components::Vec4Component< TDomainTag, THandle, TNumericType >::operator= (const Vec4Component &)
default

Default copy assignment.

Definition at line 70 of file Vec4Component.ixx.

operator=()

template <typename TDomainTag, typename THandle, typename TNumericType>
Vec4Component & helios::engine::core::components::Vec4Component< TDomainTag, THandle, TNumericType >::operator= (Vec4Component &&)
noexcept default

Default move assignment.

Definition at line 74 of file Vec4Component.ixx.

Public Member Functions

clearDirty()

template <typename TDomainTag, typename THandle, typename TNumericType>
void helios::engine::core::components::Vec4Component< TDomainTag, THandle, TNumericType >::clearDirty ()
inline noexcept

Clears the dirty flag after dependent systems consumed updates.

Definition at line 97 of file Vec4Component.ixx.

98 isDirty_ = false;
99 }

isDirty()

template <typename TDomainTag, typename THandle, typename TNumericType>
bool helios::engine::core::components::Vec4Component< TDomainTag, THandle, TNumericType >::isDirty ()
inline noexcept

Returns whether the component requires a refresh pass.

Returns

true if value changed or lifecycle hooks marked dirty.

Definition at line 106 of file Vec4Component.ixx.

107 return isDirty_;
108 }

onAcquire()

template <typename TDomainTag, typename THandle, typename TNumericType>
void helios::engine::core::components::Vec4Component< TDomainTag, THandle, TNumericType >::onAcquire ()
inline noexcept

Lifecycle hook called when the component is acquired.

Marks the component dirty to trigger downstream recomputation.

Definition at line 81 of file Vec4Component.ixx.

82 isDirty_ = true;
83 }

onRelease()

template <typename TDomainTag, typename THandle, typename TNumericType>
void helios::engine::core::components::Vec4Component< TDomainTag, THandle, TNumericType >::onRelease ()
inline noexcept

Lifecycle hook called when the component is released.

Marks the component dirty to trigger downstream recomputation.

Definition at line 90 of file Vec4Component.ixx.

91 isDirty_ = true;
92 }

setValue()

template <typename TDomainTag, typename THandle, typename TNumericType>
void helios::engine::core::components::Vec4Component< TDomainTag, THandle, TNumericType >::setValue (const vec4< TNumericType > value)
inline noexcept

Updates the value and marks the component dirty on change.

Parameters
value

New vector value.

Definition at line 133 of file Vec4Component.ixx.

133 void setValue(const vec4<TNumericType> value) noexcept {
134
135 if (value_.same(value)) {
136 return;
137 }
138
139 value_ = value;
140 isDirty_ = true;
141 };

Reference helios::engine::core::components::Vec4Component< TDomainTag, THandle, TNumericType >::value.

value()

template <typename TDomainTag, typename THandle, typename TNumericType>
vec4< TNumericType > helios::engine::core::components::Vec4Component< TDomainTag, THandle, TNumericType >::value ()
inline noexcept

Returns the current value.

Returns

Current 4D vector value.

Definition at line 115 of file Vec4Component.ixx.

116 return value_;
117 }

Referenced by helios::engine::core::components::Vec4Component< TDomainTag, THandle, TNumericType >::setValue.

value()

template <typename TDomainTag, typename THandle, typename TNumericType>
vec4< TNumericType > helios::engine::core::components::Vec4Component< TDomainTag, THandle, TNumericType >::value ()
inline noexcept

Returns the current value.

Returns

Current 4D vector value.

Definition at line 124 of file Vec4Component.ixx.

125 return value_;
126 }

Private Member Attributes

isDirty_

template <typename TDomainTag, typename THandle, typename TNumericType>
bool helios::engine::core::components::Vec4Component< TDomainTag, THandle, TNumericType >::isDirty_ = true

Definition at line 32 of file Vec4Component.ixx.

32 bool isDirty_ = true;

value_

template <typename TDomainTag, typename THandle, typename TNumericType>
helios::math::vec4<TNumericType> helios::engine::core::components::Vec4Component< TDomainTag, THandle, TNumericType >::value_ {}

Definition at line 30 of file Vec4Component.ixx.

30 helios::math::vec4<TNumericType> value_{};

The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.