Thrive
Classes | Public Member Functions | Static Public Member Functions | List of all members
thrive::RollingGrid Class Reference

Classes

struct  Implementation
 

Public Member Functions

 RollingGrid (int width, int height, int resolution)
 constructor More...
 
 ~RollingGrid ()
 destructor
 
void move (int dx, int dy)
 
int & operator() (long x, long y)
 
int get (long x, long y)
 
void set (long x, long y, int v)
 

Static Public Member Functions

static luabind::scope luaBindings ()
 Lua bindings. More...
 

Constructor & Destructor Documentation

RollingGrid::RollingGrid ( int  width,
int  height,
int  resolution 
)

constructor

Parameters
widthThe width of the grid in number of grid cells
heightThe height of the grid in number of grid cells
resolutionThe width and height of each grid cell

Member Function Documentation

luabind::scope RollingGrid::luaBindings ( )
static

Lua bindings.

Exposes:

void RollingGrid::move ( int  dx,
int  dy 
)

Moves the grid a certain distance in world coordinates.

Parameters
dx
dy
int & RollingGrid::operator() ( long  x,
long  y 
)

Get read-write access to a location in the grid. Out of bounds accesses are useless but harmless.

Parameters
xX coordinate to access, in world coordinates.
yY coordinate to access, in world coordinates.

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