Skip to main content

Mat4Component Class Template

Generic 4x4 matrix component with dirty-state tracking. More...

Declaration

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

Public Constructors Index

template <typename TDomainTag, typename THandle, typename TNumericType>
Mat4Component ()=default
template <typename TDomainTag, typename THandle, typename TNumericType>
Mat4Component (const mat4< TNumericType > &value)

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

template <typename TDomainTag, typename THandle, typename TNumericType>
Mat4Component (const TNumericType value)

Constructs the component with a scalar-filled matrix. More...

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

Copy constructor. More...

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

Default move constructor. More...

Public Operators Index

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

Default copy assignment. More...

template <typename TDomainTag, typename THandle, typename TNumericType>
Mat4Component &operator= (Mat4Component &&) 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 () noexcept -> mat4< TNumericType > &

Returns the current value for in-place modification. More...

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

Returns the current value. More...

template <typename TDomainTag, typename THandle, typename TNumericType>
voidsetValue (const mat4< 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::mat4< TNumericType >value_ {}
template <typename TDomainTag, typename THandle, typename TNumericType>
boolisDirty_ = true

Description

Generic 4x4 matrix component with dirty-state tracking.

Template Parameters
TDomainTag

Semantic domain tag.

THandle

Owning entity handle type.

TNumericType

Scalar type for matrix values.

Definition at line 28 of file Mat4Component.ixx.

Public Constructors

Mat4Component()

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

Definition at line 36 of file Mat4Component.ixx.

Mat4Component()

template <typename TDomainTag, typename THandle, typename TNumericType>
helios::engine::core::components::Mat4Component< TDomainTag, THandle, TNumericType >::Mat4Component (const mat4< TNumericType > & value)
inline explicit

Constructs the component with an initial value.

Parameters
value

Initial matrix value.

Definition at line 43 of file Mat4Component.ixx.

43 explicit Mat4Component(const mat4<TNumericType>& value) : value_(value){}

Mat4Component()

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

Constructs the component with a scalar-filled matrix.

Parameters
value

Scalar used to initialize all matrix elements.

Definition at line 50 of file Mat4Component.ixx.

50 explicit Mat4Component(const TNumericType value) : value_(mat4<TNumericType>{value}){}

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

Mat4Component()

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

Copy constructor.

Parameters
other

The component to copy from.

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

Definition at line 60 of file Mat4Component.ixx.

61 value_(other.value_),
62 isDirty_(true) {}

Mat4Component()

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

Default move constructor.

Definition at line 67 of file Mat4Component.ixx.

Public Operators

operator=()

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

Default copy assignment.

Definition at line 65 of file Mat4Component.ixx.

operator=()

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

Default move assignment.

Definition at line 69 of file Mat4Component.ixx.

Public Member Functions

clearDirty()

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

Clears the dirty flag after dependent systems consumed updates.

Definition at line 92 of file Mat4Component.ixx.

93 isDirty_ = false;
94 }

isDirty()

template <typename TDomainTag, typename THandle, typename TNumericType>
bool helios::engine::core::components::Mat4Component< 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 101 of file Mat4Component.ixx.

102 return isDirty_;
103 }

onAcquire()

template <typename TDomainTag, typename THandle, typename TNumericType>
void helios::engine::core::components::Mat4Component< 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 76 of file Mat4Component.ixx.

77 isDirty_ = true;
78 }

onRelease()

template <typename TDomainTag, typename THandle, typename TNumericType>
void helios::engine::core::components::Mat4Component< 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 85 of file Mat4Component.ixx.

86 isDirty_ = true;
87 }

setValue()

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

Updates the value and marks the component dirty on change.

Parameters
value

New matrix value.

Definition at line 128 of file Mat4Component.ixx.

128 void setValue(const mat4<TNumericType> value) noexcept {
129
130 if (value_.same(value)) {
131 return;
132 }
133
134 value_ = value;
135 isDirty_ = true;
136 };

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

value()

template <typename TDomainTag, typename THandle, typename TNumericType>
mat4< TNumericType > & helios::engine::core::components::Mat4Component< TDomainTag, THandle, TNumericType >::value ()
inline noexcept

Returns the current value for in-place modification.

Returns

Mutable reference to the current 4x4 matrix value.

Definition at line 110 of file Mat4Component.ixx.

111 return value_;
112 }

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

value()

template <typename TDomainTag, typename THandle, typename TNumericType>
const mat4< TNumericType > & helios::engine::core::components::Mat4Component< TDomainTag, THandle, TNumericType >::value ()
inline noexcept

Returns the current value.

Returns

Current 4x4 matrix value.

Definition at line 119 of file Mat4Component.ixx.

120 return value_;
121 }

Private Member Attributes

isDirty_

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

Definition at line 32 of file Mat4Component.ixx.

32 bool isDirty_ = true;

value_

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

Definition at line 30 of file Mat4Component.ixx.

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

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.