AabbColliderComponent Class
Component that defines an Axis-Aligned Bounding Box (AABB) for physics interactions. More...
Declaration
Public Constructors Index
| AabbColliderComponent ()=default | |
|
Default constructor. More... | |
| AabbColliderComponent (const AabbColliderComponent &other) | |
|
Copy constructor. More... | |
| AabbColliderComponent (AabbColliderComponent &&) noexcept=default | |
Public Operators Index
| AabbColliderComponent & | operator= (const AabbColliderComponent &)=default |
| AabbColliderComponent & | operator= (AabbColliderComponent &&) noexcept=default |
Public Member Functions Index
| bool | isEnabled () const noexcept |
|
Checks whether this component is enabled. More... | |
| void | enable () noexcept |
|
Enables this component. More... | |
| void | disable () noexcept |
|
Disables this component. More... | |
| void | onAcquire () noexcept |
|
Resets the bounds to invalidate state when this Component is acquired. More... | |
| void | onRelease () noexcept |
|
Resets the bounds to invalidate state when this Component is released. More... | |
| const helios::math::aabbf & | bounds () |
|
Retrieves the bounds of the collider. More... | |
| void | setBounds (const helios::math::aabbf &bounds) |
|
Sets the bounds of the collider. More... | |
| bool | boundsInitialized () const noexcept |
|
Checks whether the bounds of the collider have been initialized. More... | |
Private Member Attributes Index
| helios::math::aabbf | bounds_ |
|
The local bounds of the collider. More... | |
| bool | isEnabled_ = true |
|
Whether this component is enabled. More... | |
Description
Component that defines an Axis-Aligned Bounding Box (AABB) for physics interactions.
This component attaches a spatial bounding box to a GameObject, which can be used by physics systems for broad-phase collision detection or simple trigger interactions.
Definition at line 23 of file AabbColliderComponent.ixx.
Public Constructors
AabbColliderComponent()
| explicit default |
Default constructor.
Definition at line 63 of file AabbColliderComponent.ixx.
Referenced by AabbColliderComponent, AabbColliderComponent, operator= and operator=.
AabbColliderComponent()
| inline |
Copy constructor.
Preserves the bounds of this component.
Definition at line 70 of file AabbColliderComponent.ixx.
Reference AabbColliderComponent.
AabbColliderComponent()
| noexcept default |
Definition at line 74 of file AabbColliderComponent.ixx.
Reference AabbColliderComponent.
Public Operators
operator=()
| default |
Definition at line 73 of file AabbColliderComponent.ixx.
Reference AabbColliderComponent.
operator=()
| noexcept default |
Definition at line 75 of file AabbColliderComponent.ixx.
Reference AabbColliderComponent.
Public Member Functions
bounds()
| inline nodiscard |
Retrieves the bounds of the collider.
- Returns
A const reference to the AABB.
Definition at line 96 of file AabbColliderComponent.ixx.
Referenced by setBounds and helios::engine::modules::physics::collision::systems::GridCollisionDetectionSystem::solveCell.
boundsInitialized()
| inline nodiscard noexcept |
Checks whether the bounds of the collider have been initialized.
Bounds of the collider component are considered to be initialized if the minimum X coordinate is less or equal to the maximum X coordinate.
- Returns
true if the bounds are considered to be initialized; otherwise, false.
Definition at line 117 of file AabbColliderComponent.ixx.
disable()
| inline noexcept |
Disables this component.
Definition at line 56 of file AabbColliderComponent.ixx.
enable()
| inline noexcept |
Enables this component.
Definition at line 49 of file AabbColliderComponent.ixx.
isEnabled()
| inline nodiscard noexcept |
Checks whether this component is enabled.
- Returns
True if enabled, false otherwise.
Definition at line 42 of file AabbColliderComponent.ixx.
onAcquire()
| inline noexcept |
onRelease()
| inline noexcept |
Resets the bounds to invalidate state when this Component is released.
Definition at line 87 of file AabbColliderComponent.ixx.
setBounds()
| inline |
Sets the bounds of the collider.
- Parameters
-
bounds The new AABB to set.
Definition at line 105 of file AabbColliderComponent.ixx.
Reference bounds.
Private Member Attributes
bounds_
|
The local bounds of the collider.
Definition at line 28 of file AabbColliderComponent.ixx.
isEnabled_
|
Whether this component is enabled.
Definition at line 33 of file AabbColliderComponent.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.