Skip to main content

AABBComponent Class Template

Generic AABB value component with dirty-state tracking. More...

Declaration

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

Public Constructors Index

template <typename TDomainTag, typename THandle, typename TNumericType>
AABBComponent ()=default
template <typename TDomainTag, typename THandle, typename TNumericType>
AABBComponent (const aabb< TNumericType > &value)

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

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

Copy constructor. More...

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

Default move constructor. More...

Public Operators Index

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

Default copy assignment. More...

template <typename TDomainTag, typename THandle, typename TNumericType>
AABBComponent &operator= (AABBComponent &&) 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 -> aabb< TNumericType > &

Returns the current value. More...

template <typename TDomainTag, typename THandle, typename TNumericType>
auto value () const noexcept -> const aabb< TNumericType > &
template <typename TDomainTag, typename THandle, typename TNumericType>
voidsetValue (const aabb< 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::aabb< TNumericType >value_ {}
template <typename TDomainTag, typename THandle, typename TNumericType>
boolisDirty_ = true

Description

Generic AABB value component with dirty-state tracking.

Template Parameters
TDomainTag

Semantic domain tag.

THandle

Owning entity handle type.

TNumericType

Scalar type for AABB values.

Definition at line 24 of file AABBComponent.ixx.

Public Constructors

AABBComponent()

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

Definition at line 32 of file AABBComponent.ixx.

AABBComponent()

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

Constructs the component with an initial value.

Parameters
value

Initial value vector.

Definition at line 39 of file AABBComponent.ixx.

39 explicit AABBComponent(const aabb<TNumericType>& value) : value_(value){}

AABBComponent()

template <typename TDomainTag, typename THandle, typename TNumericType>
helios::engine::core::components::AABBComponent< TDomainTag, THandle, TNumericType >::AABBComponent (const AABBComponent & 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 49 of file AABBComponent.ixx.

50 value_(other.value_),
51 isDirty_(true) {}

AABBComponent()

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

Default move constructor.

Definition at line 56 of file AABBComponent.ixx.

Public Operators

operator=()

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

Default copy assignment.

Definition at line 54 of file AABBComponent.ixx.

operator=()

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

Default move assignment.

Definition at line 58 of file AABBComponent.ixx.

Public Member Functions

clearDirty()

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

Clears the dirty flag after dependent systems consumed updates.

Definition at line 81 of file AABBComponent.ixx.

82 isDirty_ = false;
83 }

isDirty()

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

91 return isDirty_;
92 }

onAcquire()

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

66 isDirty_ = true;
67 }

onRelease()

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

75 isDirty_ = true;
76 }

setValue()

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

Updates the value and marks the component dirty on change.

Parameters
value

New value vector.

Definition at line 112 of file AABBComponent.ixx.

112 void setValue(const aabb<TNumericType> value) noexcept {
113
114 if (value_.same(value)) {
115 return;
116 }
117
118 value_ = value;
119 isDirty_ = true;
120 };

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

value()

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

Returns the current value.

Returns

Current axis-aligned bounding box value.

Definition at line 99 of file AABBComponent.ixx.

100 return value_;
101 }

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

value()

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

Definition at line 103 of file AABBComponent.ixx.

104 return value_;
105 }

Private Member Attributes

isDirty_

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

Definition at line 28 of file AABBComponent.ixx.

28 bool isDirty_ = true;

value_

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

Definition at line 26 of file AABBComponent.ixx.

26 helios::math::aabb<TNumericType> value_{};

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.