|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
Set of collision layers that a collider may belong to. More...
#include <GREM/physics/Shape.hpp>
Public Member Functions | |
| constexpr | CollisionLayers () noexcept=default |
| Construct an empty layer set. | |
| constexpr | CollisionLayers (CollisionLayer layer) noexcept |
| Construct a layer set containing only one specific layer. | |
| constexpr bool | operator== (const CollisionLayers &other) const noexcept=default |
| Compare this layer set to another for equality. | |
| constexpr bool | empty () const noexcept |
| Check if the layer set is empty. | |
| constexpr bool | contains (CollisionLayer layer) const noexcept |
| Check if the layer set contains the given layer. | |
| constexpr bool | containsAnyOf (CollisionLayers layers) const noexcept |
| Check if the layer set contains at least one of the given layers. | |
| constexpr bool | containsAllOf (CollisionLayers layers) const noexcept |
| Check if the layer set contains all of the given layers. | |
Static Public Attributes | |
| static const CollisionLayers | ALL = ~CollisionLayers{} |
| Set containing all possible layers. | |
Friends | |
| constexpr CollisionLayers | operator~ (CollisionLayers a) noexcept |
| Get the complement of a layer set. | |
| constexpr CollisionLayers | operator& (CollisionLayers a, CollisionLayers b) noexcept |
| Get the intersection of two layer sets. | |
| constexpr CollisionLayers | operator| (CollisionLayers a, CollisionLayers b) noexcept |
| Get the union of two layer sets. | |
| constexpr CollisionLayers | operator^ (CollisionLayers a, CollisionLayers b) noexcept |
| Get the symmetric difference of two layer sets. | |
| constexpr CollisionLayers & | operator&= (CollisionLayers &a, CollisionLayers b) noexcept |
| Assign the intersection of two layer sets to the first set. | |
| constexpr CollisionLayers & | operator|= (CollisionLayers &a, CollisionLayers b) noexcept |
| Assign the union of two layer sets to the first set. | |
| constexpr CollisionLayers & | operator^= (CollisionLayers &a, CollisionLayers b) noexcept |
| Assign the symmetric difference of two layer sets to the first set. | |
Set of collision layers that a collider may belong to.
|
constexprdefaultnoexcept |
Construct an empty layer set.
|
inlineconstexprnoexcept |
Construct a layer set containing only one specific layer.
| layer | layer identifier to include. |
|
nodiscardconstexprdefaultnoexcept |
Compare this layer set to another for equality.
| other | the layer set to compare this one to. |
|
inlinenodiscardconstexprnoexcept |
Check if the layer set is empty.
|
inlinenodiscardconstexprnoexcept |
Check if the layer set contains the given layer.
| layer | layer identifier to check for. |
|
inlinenodiscardconstexprnoexcept |
Check if the layer set contains at least one of the given layers.
| layers | layer set to check for. |
|
inlinenodiscardconstexprnoexcept |
Check if the layer set contains all of the given layers.
| layers | layer set to check for. |
|
friend |
Get the complement of a layer set.
| a | the set to invert. |
|
friend |
Get the intersection of two layer sets.
| a | first layer set. |
| b | second layer set. |
|
friend |
Get the union of two layer sets.
| a | first layer set. |
| b | second layer set. |
|
friend |
Get the symmetric difference of two layer sets.
| a | first layer set. |
| b | second layer set. |
|
friend |
Assign the intersection of two layer sets to the first set.
| a | first layer set. |
| b | second layer set. |
|
friend |
Assign the union of two layer sets to the first set.
| a | first layer set. |
| b | second layer set. |
|
friend |
Assign the symmetric difference of two layer sets to the first set.
| a | first layer set. |
| b | second layer set. |
|
inlinestaticconstexpr |
Set containing all possible layers.