GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::physics::CollisionLayer Class Reference

Identifier for a collision layer that a collider may belong to. More...

#include <GREM/physics/Shape.hpp>

Public Member Functions

constexpr CollisionLayer (size_t index) noexcept
 Construct a layer identifier with a specific index.
constexpr operator size_t () const noexcept
 Convert this layer identifier to its underlying index.
constexpr bool operator== (const CollisionLayer &other) const noexcept=default
 Compare this layer identifier to another for equality.

Static Public Attributes

static const CollisionLayer MAX = CollisionLayer{31}
 Maximum collision layer value.

Detailed Description

Identifier for a collision layer that a collider may belong to.

Constructor & Destructor Documentation

◆ CollisionLayer()

grem::physics::CollisionLayer::CollisionLayer ( size_t index)
inlineexplicitconstexprnoexcept

Construct a layer identifier with a specific index.

Parameters
indexindex of the layer.

Member Function Documentation

◆ operator size_t()

grem::physics::CollisionLayer::operator size_t ( ) const
inlineexplicitconstexprnoexcept

Convert this layer identifier to its underlying index.

Returns
the index of the layer.

◆ operator==()

bool grem::physics::CollisionLayer::operator== ( const CollisionLayer & other) const
nodiscardconstexprdefaultnoexcept

Compare this layer identifier to another for equality.

Parameters
otherthe layer identifier to compare this one to.
Returns
true if the layer identifiers are equal, false otherwise.

Member Data Documentation

◆ MAX

CollisionLayer grem::physics::CollisionLayer::MAX = CollisionLayer{31}
inlinestaticconstexpr

Maximum collision layer value.


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