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 (u16 i, u16 j)
 
bool operator== (const TileID &b) const
 
bool operator< (const TileID &b) const
 Returns lexicographic order over (i,j) More...
 
u16 i () const
 
u16 j () const
 

Private Attributes

u32 data
 

Detailed Description

Represents the 2D coordinates of a tile.

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

Constructor & Destructor Documentation

◆ TileID() [1/2]

TileID::TileID ( )
inline

◆ TileID() [2/2]

TileID::TileID ( u16  i,
u16  j 
)
inline

Member Function Documentation

◆ i()

u16 TileID::i ( ) const
inline

◆ j()

u16 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

u32 TileID::data
private

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