GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::graphics::SpriteID Struct Reference

Identifier for a specific image in a SpriteAtlas. More...

#include <GREM/graphics/SpriteAtlas.hpp>

Public Member Functions

constexpr SpriteID () noexcept=default
 Construct an invalid sprite identifier.
constexpr operator bool () const noexcept
 Check if this identifier is potentially valid.
constexpr bool operator== (const SpriteID &other) const noexcept=default
 Compare this identifier to another for equality.
constexpr std::strong_ordering operator<=> (const SpriteID &other) const noexcept=default
 Compare this identifier to another.

Detailed Description

Identifier for a specific image in a SpriteAtlas.

Constructor & Destructor Documentation

◆ SpriteID()

grem::graphics::SpriteID::SpriteID ( )
constexprdefaultnoexcept

Construct an invalid sprite identifier.

Member Function Documentation

◆ operator bool()

grem::graphics::SpriteID::operator bool ( ) const
inlineexplicitconstexprnoexcept

Check if this identifier is potentially valid.

Returns
true if this identifier is potentially valid, false if it is equal to a default-constructed invalid identifier.

◆ operator==()

bool grem::graphics::SpriteID::operator== ( const SpriteID & other) const
nodiscardconstexprdefaultnoexcept

Compare this identifier to another for equality.

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

◆ operator<=>()

std::strong_ordering grem::graphics::SpriteID::operator<=> ( const SpriteID & other) const
nodiscardconstexprdefaultnoexcept

Compare this identifier to another.

Parameters
otherthe identifier to compare this one to.
Returns
a strong ordering between the two identifiers.

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