Skip to main content

ModelAabbComponent Class Template

Component that stores the canonical Axis-Aligned Bounding Box (AABB) of a model. More...

Declaration

template <typename THandle> class helios::engine::rendering::model::components::ModelAabbComponent<THandle> { ... }

Public Constructors Index

template <typename THandle>
ModelAabbComponent ()=default

Default constructor. More...

template <typename THandle>
ModelAabbComponent (const ModelAabbComponent &other)
template <typename THandle>
ModelAabbComponent (ModelAabbComponent &&) noexcept=default

Public Operators Index

template <typename THandle>
ModelAabbComponent &operator= (const ModelAabbComponent &)=default
template <typename THandle>
ModelAabbComponent &operator= (ModelAabbComponent &&) noexcept=default

Public Member Functions Index

template <typename THandle>
boolisEnabled () const noexcept

Checks whether this component is enabled. More...

template <typename THandle>
voidenable () noexcept

Enables this component. More...

template <typename THandle>
voiddisable () noexcept

Disables this component. More...

template <typename THandle>
voidsetAabb (const helios::math::aabbf &aabb)

Sets the AABB for this component. More...

template <typename THandle>
const helios::math::aabbf &aabb () const noexcept

Retrieves the stored AABB. More...

Private Member Attributes Index

template <typename THandle>
helios::math::aabbfaabb_ {}

The stored AABB. More...

template <typename THandle>
boolisEnabled_ = true

Whether this component is enabled. More...

Description

Component that stores the canonical Axis-Aligned Bounding Box (AABB) of a model.

This component is used to associate spatial bounds with an entity, typically derived from a 3D model or mesh. It is essential for culling, collision detection, and other spatial queries.

Definition at line 24 of file ModelAabbComponent.ixx.

Public Constructors

ModelAabbComponent()

template <typename THandle>
helios::engine::rendering::model::components::ModelAabbComponent< THandle >::ModelAabbComponent ()
default

Default constructor.

Definition at line 64 of file ModelAabbComponent.ixx.

ModelAabbComponent()

template <typename THandle>
helios::engine::rendering::model::components::ModelAabbComponent< THandle >::ModelAabbComponent (const ModelAabbComponent & other)
inline

Definition at line 66 of file ModelAabbComponent.ixx.

67 aabb_(other.aabb_) {}

ModelAabbComponent()

template <typename THandle>
helios::engine::rendering::model::components::ModelAabbComponent< THandle >::ModelAabbComponent (ModelAabbComponent &&)
noexcept default

Definition at line 70 of file ModelAabbComponent.ixx.

Public Operators

operator=()

template <typename THandle>
ModelAabbComponent & helios::engine::rendering::model::components::ModelAabbComponent< THandle >::operator= (const ModelAabbComponent &)
default

Definition at line 69 of file ModelAabbComponent.ixx.

operator=()

template <typename THandle>
ModelAabbComponent & helios::engine::rendering::model::components::ModelAabbComponent< THandle >::operator= (ModelAabbComponent &&)
noexcept default

Definition at line 71 of file ModelAabbComponent.ixx.

Public Member Functions

aabb()

template <typename THandle>
const helios::math::aabbf & helios::engine::rendering::model::components::ModelAabbComponent< THandle >::aabb ()
inline noexcept

Retrieves the stored AABB.

Returns

Constant reference to the AABB.

Definition at line 88 of file ModelAabbComponent.ixx.

88 [[nodiscard]] const helios::math::aabbf& aabb() const noexcept {
89 return aabb_;
90 }

Referenced by helios::engine::rendering::model::components::ModelAabbComponent< THandle >::setAabb.

disable()

template <typename THandle>
void helios::engine::rendering::model::components::ModelAabbComponent< THandle >::disable ()
inline noexcept

Disables this component.

Definition at line 57 of file ModelAabbComponent.ixx.

58 isEnabled_ = false;
59 }

enable()

template <typename THandle>
void helios::engine::rendering::model::components::ModelAabbComponent< THandle >::enable ()
inline noexcept

Enables this component.

Definition at line 50 of file ModelAabbComponent.ixx.

50 void enable() noexcept {
51 isEnabled_ = true;
52 }

isEnabled()

template <typename THandle>
bool helios::engine::rendering::model::components::ModelAabbComponent< THandle >::isEnabled ()
inline noexcept

Checks whether this component is enabled.

Returns

True if enabled, false otherwise.

Definition at line 43 of file ModelAabbComponent.ixx.

44 return isEnabled_;
45 }

setAabb()

template <typename THandle>
void helios::engine::rendering::model::components::ModelAabbComponent< THandle >::setAabb (const helios::math::aabbf & aabb)
inline

Sets the AABB for this component.

Parameters
aabb

The new AABB to store.

Definition at line 78 of file ModelAabbComponent.ixx.

78 void setAabb(const helios::math::aabbf& aabb) {
79 aabb_ = aabb;
80 }

Reference helios::engine::rendering::model::components::ModelAabbComponent< THandle >::aabb.

Private Member Attributes

aabb_

template <typename THandle>
helios::math::aabbf helios::engine::rendering::model::components::ModelAabbComponent< THandle >::aabb_ {}

The stored AABB.

Definition at line 29 of file ModelAabbComponent.ixx.

29 helios::math::aabbf aabb_{};

isEnabled_

template <typename THandle>
bool helios::engine::rendering::model::components::ModelAabbComponent< THandle >::isEnabled_ = true

Whether this component is enabled.

Definition at line 34 of file ModelAabbComponent.ixx.

34 bool isEnabled_ = true;

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.