|
Aegis2D
Modular C++26 2D game engine for networked games
|
Two entities that may collide, the one with the smaller handle first. More...
#include <aegis2d/ecs/collision.hpp>
Static Public Member Functions | |
| static constexpr CollisionPair | of (Entity a, Entity b) noexcept |
| Builds a pair in canonical order, whatever the order of the arguments. | |
Public Attributes | |
| Entity | first |
| Entity with the smaller handle. | |
| Entity | second |
| Entity with the larger handle. | |
Friends | |
| constexpr bool | operator== (const CollisionPair &, const CollisionPair &) noexcept=default |
| Compares the pairs. | |
| constexpr std::strong_ordering | operator<=> (const CollisionPair &, const CollisionPair &) noexcept=default |
| Orders the pairs by first, then second entity. | |
Two entities that may collide, the one with the smaller handle first.
|
inlinestaticconstexprnoexcept |
Builds a pair in canonical order, whatever the order of the arguments.
| a | One entity. |
| b | The other entity. |
{min(a, b), max(a, b)}.
|
friend |
Orders the pairs by first, then second entity.
|
friend |
Compares the pairs.