Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
TileID Struct Reference

Represents the 2D coordinates of a tile. More...

#include <LongPathfinder.h>

Public Member Functions

 TileID ()
 
 TileID (std::uint16_t i, std::uint16_t j)
 
bool operator== (const TileID &b) const
 
bool operator< (const TileID &b) const
 Returns lexicographic order over (i,j) More...
 
std::uint16_t i () const
 
std::uint16_t j () const
 

Private Attributes

std::uint32_t data
 

Detailed Description

Represents the 2D coordinates of a tile.

The i/j components are packed into a single std::uint32_t, since we usually use these objects for equality comparisons and the VC2010 optimizer doesn't seem to automatically compare two std::uint16_ts in a single operation. TODO: maybe VC2012 will?

Constructor & Destructor Documentation

◆ TileID() [1/2]

TileID::TileID ( )
inline

◆ TileID() [2/2]

TileID::TileID ( std::uint16_t  i,
std::uint16_t  j 
)
inline

Member Function Documentation

◆ i()

std::uint16_t TileID::i ( ) const
inline

◆ j()

std::uint16_t TileID::j ( ) const
inline

◆ operator<()

bool TileID::operator< ( const TileID &  b) const
inline

Returns lexicographic order over (i,j)

◆ operator==()

bool TileID::operator== ( const TileID &  b) const
inline

Member Data Documentation

◆ data

std::uint32_t TileID::data
private

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