infinitewisdom.model.grid
Class GlobalGrid

java.lang.Object
  extended by infinitewisdom.model.grid.GlobalGrid

public class GlobalGrid
extends java.lang.Object


Constructor Summary
GlobalGrid(GameWorld gw, double csize, double unitSizeOffset)
           
 
Method Summary
 GlobalCell getCell(int x, int y)
           
 GlobalCell getCell(Vec2i pos)
           
 double getCellSize()
           
 GameWorld getGameWorld()
           
 int getSizeX()
           
 int getSizeY()
           
 Vec2i quantize(Vec2f pos)
           
 void quantizeAll()
          Transform the continous game-space to discrete, so that pathfinding can be done.
 void setCell(GlobalCell c, int x, int y)
           
 void setCell(GlobalCell c, Vec2i pos)
           
 Vec2i vf2vi(Vec2f vf)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalGrid

public GlobalGrid(GameWorld gw,
                  double csize,
                  double unitSizeOffset)
Method Detail

getCell

public GlobalCell getCell(int x,
                          int y)

getCell

public GlobalCell getCell(Vec2i pos)

setCell

public void setCell(GlobalCell c,
                    int x,
                    int y)

setCell

public void setCell(GlobalCell c,
                    Vec2i pos)

quantizeAll

public void quantizeAll()
Transform the continous game-space to discrete, so that pathfinding can be done.


quantize

public Vec2i quantize(Vec2f pos)

getSizeX

public int getSizeX()

getSizeY

public int getSizeY()

vf2vi

public Vec2i vf2vi(Vec2f vf)

getGameWorld

public GameWorld getGameWorld()

getCellSize

public double getCellSize()