Skip to main content

QuaternionComponent Class Template

Generic quaternion component with domain tagging and dirty tracking. More...

Declaration

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

Public Member Functions Index

template <typename TDomainTag, typename TNumericType, typename ... Args>
auto value () const noexcept -> const helios::math::quat< TNumericType > &

Returns the current quaternion value. More...

template <typename TDomainTag, typename TNumericType, typename ... Args>
voidsetValue (const helios::math::quat< TNumericType > &value) noexcept

Updates the quaternion value and marks the component as dirty. More...

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

Returns whether the component value changed since last clear. More...

template <typename TDomainTag, typename TNumericType, typename ... Args>
voidclearDirty () noexcept

Clears the dirty flag. More...

Private Member Attributes Index

template <typename TDomainTag, typename TNumericType, typename ... Args>
helios::math::quat< TNumericType >quat = helios::math::quat<TNumericType>::identity()
template <typename TDomainTag, typename TNumericType, typename ... Args>
boolisDirty_ = true

Description

Generic quaternion component with domain tagging and dirty tracking.

Template Parameters
TDomainTag

Domain tag type used for semantic component grouping.

TNumericType

Floating-point scalar type used by helios::math::quat.

Args

Additional template arguments (e.g. owner handle, tags).

Definition at line 25 of file QuaternionComponent.ixx.

Public Member Functions

clearDirty()

template <typename TDomainTag, typename TNumericType, typename ... Args>
void helios::engine::core::components::QuaternionComponent< TDomainTag, TNumericType, Args >::clearDirty ()
inline noexcept

Clears the dirty flag.

Definition at line 65 of file QuaternionComponent.ixx.

66 isDirty_ = false;
67 }

isDirty()

template <typename TDomainTag, typename TNumericType, typename ... Args>
bool helios::engine::core::components::QuaternionComponent< TDomainTag, TNumericType, Args >::isDirty ()
inline noexcept

Returns whether the component value changed since last clear.

Returns

true if dirty; otherwise false.

Definition at line 57 of file QuaternionComponent.ixx.

58 return isDirty_;
59 }

setValue()

template <typename TDomainTag, typename TNumericType, typename ... Args>
void helios::engine::core::components::QuaternionComponent< TDomainTag, TNumericType, Args >::setValue (const helios::math::quat< TNumericType > & value)
inline noexcept

Updates the quaternion value and marks the component as dirty.

Parameters
value

New quaternion value.

Definition at line 47 of file QuaternionComponent.ixx.

47 void setValue(const helios::math::quat<TNumericType>& value) noexcept {
48 quat = value;
49 isDirty_ = true;
50 }

Reference helios::engine::core::components::QuaternionComponent< TDomainTag, TNumericType, Args >::value.

value()

template <typename TDomainTag, typename TNumericType, typename ... Args>
const helios::math::quat< TNumericType > & helios::engine::core::components::QuaternionComponent< TDomainTag, TNumericType, Args >::value ()
inline noexcept

Returns the current quaternion value.

Returns

Const reference to the stored quaternion.

Definition at line 38 of file QuaternionComponent.ixx.

38 [[nodiscard]] const helios::math::quat<TNumericType>& value() const noexcept {
39 return quat;
40 }

Referenced by helios::engine::core::components::QuaternionComponent< TDomainTag, TNumericType, Args >::setValue.

Private Member Attributes

isDirty_

template <typename TDomainTag, typename TNumericType, typename ... Args>
bool helios::engine::core::components::QuaternionComponent< TDomainTag, TNumericType, Args >::isDirty_ = true

Definition at line 29 of file QuaternionComponent.ixx.

29 bool isDirty_ = true;

quat

template <typename TDomainTag, typename TNumericType, typename ... Args>
helios::math::quat<TNumericType> helios::engine::core::components::QuaternionComponent< TDomainTag, TNumericType, Args >::quat = helios::math::quat<TNumericType>::identity()

Definition at line 27 of file QuaternionComponent.ixx.

27 helios::math::quat<TNumericType> quat = helios::math::quat<TNumericType>::identity();

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.