Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

TileLocation Class Reference

A TileLocation object represents a tile location in a diamond isomap that can be moved around in any of the 8 "screen" directions. More...

#include <TileLocation.h>

List of all members.

Public Methods

 TileLocation ()
 The default ctor creates a location at 0,0.

 TileLocation (const TileLocation &o)
 Copy constructor works as expected.

 TileLocation (int x, int y)
 Constructor for specifing initial location.

 ~TileLocation ()
 Destructor.

int getX () const
 Returns the X location.

int getY () const
 Returns the Y location.

void north ()
 Moves the TileLocation one tile "north" (as defined by the "screen").

void northeast ()
 Moves the TileLocation one tile "northeast" (as defined by the "screen").

void east ()
 Moves the TileLocation one tile "east" (as defined by the "screen").

void southeast ()
 Moves the TileLocation one tile "southeast" (as defined by the "screen").

void south ()
 Moves the TileLocation one tile "south" (as defined by the "screen").

void southwest ()
 Moves the TileLocation one tile "southwest" (as defined by the "screen").

void west ()
 Moves the TileLocation one tile "west" (as defined by the "screen").

void northwest ()
 Moves the TileLocation one tile "northwest" (as defined by the "screen").

TileLocation & operator= (const TileLocation &rhs)
 Assignment operator works as expected.

bool operator== (const TileLocation &rhs)
 Equality operator works as expected.


Detailed Description

A TileLocation object represents a tile location in a diamond isomap that can be moved around in any of the 8 "screen" directions.

TileLocations can be copied.

The TileLocation class is implemented in the header as its implementation is trivial from both a programmer and computational perspective. It is also used in the map's render loop and thus TileLocation makes a good canidate for inlining.


Constructor & Destructor Documentation

TileLocation::TileLocation   [inline]
 

The default ctor creates a location at 0,0.

TileLocation::TileLocation const TileLocation &    o [inline]
 

Copy constructor works as expected.

TileLocation::TileLocation int    x,
int    y
[inline]
 

Constructor for specifing initial location.

TileLocation::~TileLocation   [inline]
 

Destructor.


Member Function Documentation

void TileLocation::east   [inline]
 

Moves the TileLocation one tile "east" (as defined by the "screen").

int TileLocation::getX   const [inline]
 

Returns the X location.

int TileLocation::getY   const [inline]
 

Returns the Y location.

void TileLocation::north   [inline]
 

Moves the TileLocation one tile "north" (as defined by the "screen").

void TileLocation::northeast   [inline]
 

Moves the TileLocation one tile "northeast" (as defined by the "screen").

void TileLocation::northwest   [inline]
 

Moves the TileLocation one tile "northwest" (as defined by the "screen").

TileLocation& TileLocation::operator= const TileLocation &    rhs [inline]
 

Assignment operator works as expected.

bool TileLocation::operator== const TileLocation &    rhs [inline]
 

Equality operator works as expected.

void TileLocation::south   [inline]
 

Moves the TileLocation one tile "south" (as defined by the "screen").

void TileLocation::southeast   [inline]
 

Moves the TileLocation one tile "southeast" (as defined by the "screen").

void TileLocation::southwest   [inline]
 

Moves the TileLocation one tile "southwest" (as defined by the "screen").

void TileLocation::west   [inline]
 

Moves the TileLocation one tile "west" (as defined by the "screen").


The documentation for this class was generated from the following file:
Generated on Tue Mar 4 02:29:26 2003 for SuperIsoBomb by doxygen1.2.18