Skip to main content

AABBComponent Class Template

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

Declaration

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

Public Constructors Index

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

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

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

Copy constructor. More...

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

Default move constructor. More...

Public Operators Index

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

Default copy assignment. More...

template <typename TDomainTag, typename TNumericType, typename ... Args>
AABBComponent &operator= (AABBComponent &&) noexcept=default

Default move assignment. More...

Public Member Functions Index

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

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

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

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

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

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

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

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

template <typename TDomainTag, typename TNumericType, typename ... Args>
auto value () noexcept -> aabb< TNumericType > &

Returns the current value. More...

template <typename TDomainTag, typename TNumericType, typename ... Args>
auto value () const noexcept -> const aabb< TNumericType > &
template <typename TDomainTag, typename TNumericType, typename ... Args>
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 TNumericType, typename ... Args>
helios::math::aabb< TNumericType >value_ {}
template <typename TDomainTag, typename TNumericType, typename ... Args>
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 22 of file AABBComponent.ixx.

Public Constructors

AABBComponent()

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

Definition at line 30 of file AABBComponent.ixx.

AABBComponent()

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

Constructs the component with an initial value.

Parameters
value

Initial value vector.

Definition at line 37 of file AABBComponent.ixx.

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

AABBComponent()

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

48 value_(other.value_),
49 isDirty_(true) {}

AABBComponent()

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

Default move constructor.

Definition at line 54 of file AABBComponent.ixx.

Public Operators

operator=()

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

Default copy assignment.

Definition at line 52 of file AABBComponent.ixx.

operator=()

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

Default move assignment.

Definition at line 56 of file AABBComponent.ixx.

Public Member Functions

clearDirty()

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

Clears the dirty flag after dependent systems consumed updates.

Definition at line 79 of file AABBComponent.ixx.

80 isDirty_ = false;
81 }

isDirty()

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

Returns whether the component requires a refresh pass.

Returns

true if value changed or lifecycle hooks marked dirty.

Definition at line 88 of file AABBComponent.ixx.

89 return isDirty_;
90 }

onAcquire()

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

Lifecycle hook called when the component is acquired.

Marks the component dirty to trigger downstream recomputation.

Definition at line 63 of file AABBComponent.ixx.

64 isDirty_ = true;
65 }

onRelease()

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

Lifecycle hook called when the component is released.

Marks the component dirty to trigger downstream recomputation.

Definition at line 72 of file AABBComponent.ixx.

73 isDirty_ = true;
74 }

setValue()

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

110 void setValue(const aabb<TNumericType> value) noexcept {
111 value_ = value;
112 isDirty_ = true;
113 };

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

value()

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

Returns the current value.

Returns

Current axis-aligned bounding box value.

Definition at line 97 of file AABBComponent.ixx.

98 return value_;
99 }

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

value()

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

Definition at line 101 of file AABBComponent.ixx.

102 return value_;
103 }

Private Member Attributes

isDirty_

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

Definition at line 26 of file AABBComponent.ixx.

26 bool isDirty_ = true;

value_

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

Definition at line 24 of file AABBComponent.ixx.

24 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.