|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deken.game.map.MapSize
public class MapSize
Constructor Summary | |
---|---|
MapSize()
Defaults all values to one. |
|
MapSize(int width,
int height)
Defaults the depth to one. |
|
MapSize(int width,
int height,
int depth)
|
|
MapSize(int width,
int height,
int gridWidth,
int gridHeight)
Defaults the depth to zero and a grid depth of zero. |
|
MapSize(int width,
int height,
int depth,
int gridWidth,
int gridHeight,
int gridDepth)
|
Method Summary | |
---|---|
void |
ensureSize()
Makes sure all the sizes are not zero. |
int |
getDepth()
Number of layers in the map. |
int |
getFullDepth()
Returns the full pixel depth of the map. |
int |
getFullHeight()
Returns the full pixel height of the map. |
int |
getFullWidth()
Returns the full pixel width of the map. |
int |
getGridDepth()
|
int |
getGridHeight()
|
int |
getGridWidth()
|
int |
getHeight()
Number of grids. |
GameLocation |
getPixelsFromTiles(GameLocation gameLocation)
Creates a GameLocation that is in Pixels, from the tile size. |
GameLocation |
getTileLocationFromLocation(GameLocation location)
|
int |
getWidth()
Number of grids. |
int |
getXPixelFromTile(int tile)
Returns the pixel location of the X Tile. |
int |
getXTileFromPixels(double pixels)
|
int |
getXTileFromPixels(int pixels)
Returns the X Tile at the pixel location. |
double |
getXTilePixelFromPixel(double pixels)
Returns the pixel location of the tile of the value passed in. |
int |
getYPixelFromTile(int tile)
Returns the pixel location of the Y Tile. |
int |
getYTileFromPixels(double pixels)
|
int |
getYTileFromPixels(int pixels)
Returns the Y Tile at the pixel location |
double |
getYTilePixelFromPixel(double pixels)
Returns the pixel location of the tile of the value passed in. |
int |
getZPixelFromTile(int tile)
Returns the pixel location of the Z Tile. |
int |
getZTileFromPixels(int pixels)
Returns the Z Tile at the pixel location. |
boolean |
isXTileFromPixelsExact(double pixels)
|
boolean |
isXTileFromPixelsExact(int pixels)
|
boolean |
isYTileFromPixelsExact(double pixels)
|
boolean |
isYTileFromPixelsExact(int pixels)
|
void |
setDepth(int depth)
Number of grids. |
void |
setGridDepth(int gridDepth)
|
void |
setGridHeight(int gridHeight)
Number of grids. |
void |
setGridWidth(int gridWidth)
|
void |
setHeight(int height)
|
void |
setWidth(int width)
Number of grids. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MapSize()
public MapSize(int width, int height)
width
- int Number of grids.height
- int Number of grids.public MapSize(int width, int height, int depth)
width
- int Number of grids.height
- int Number of grids.depth
- int Number of grids.public MapSize(int width, int height, int gridWidth, int gridHeight)
width
- int Number of grids.height
- int Number of grids.gridWidth
- int Size of grid width.gridHeight
- int Size of grid height.public MapSize(int width, int height, int depth, int gridWidth, int gridHeight, int gridDepth)
width
- int Number of grids.height
- int Number of grids.depth
- int Number of grids.gridWidth
- int Size of grid width.gridHeight
- int Size of grid height.gridDepth
- int Size of grid depth.Method Detail |
---|
public void ensureSize()
public int getDepth()
public int getFullDepth()
public int getFullHeight()
public int getFullWidth()
public int getGridDepth()
public int getGridHeight()
public int getGridWidth()
public int getHeight()
public GameLocation getPixelsFromTiles(GameLocation gameLocation)
gameLocation
- GameLocation
public int getWidth()
public GameLocation getTileLocationFromLocation(GameLocation location)
public int getXTileFromPixels(int pixels)
pixels
- int
public int getXTileFromPixels(double pixels)
public double getXTilePixelFromPixel(double pixels)
pixels
-
public int getXPixelFromTile(int tile)
tile
- int
public int getYTileFromPixels(int pixels)
pixels
- int
public int getYTileFromPixels(double pixels)
public double getYTilePixelFromPixel(double pixels)
pixels
-
public int getYPixelFromTile(int tile)
tile
- int
public int getZTileFromPixels(int pixels)
pixels
- int
public int getZPixelFromTile(int tile)
tile
- int
public boolean isXTileFromPixelsExact(int pixels)
public boolean isXTileFromPixelsExact(double pixels)
public boolean isYTileFromPixelsExact(int pixels)
public boolean isYTileFromPixelsExact(double pixels)
public void setDepth(int depth)
depth
- intpublic void setGridDepth(int gridDepth)
gridDepth
- intpublic void setGridHeight(int gridHeight)
gridHeight
- intpublic void setGridWidth(int gridWidth)
gridWidth
- intpublic void setHeight(int height)
height
- intpublic void setWidth(int width)
width
- intpublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |