erland.game.tileadventure.rect
Class RectBlockContainerData
java.lang.Object
erland.game.tileadventure.BlockContainerData
erland.game.tileadventure.rect.RectBlockContainerData
- All Implemented Interfaces:
- IrregularBlockContainerInterface
public class RectBlockContainerData
- extends BlockContainerData
Constructor Summary |
RectBlockContainerData(int offsetX,
int offsetY,
int blockDrawingOffsetX,
int blockDrawingOffsetY,
int sizeX,
int sizeY,
int sizeZ,
int squareSizeX,
int squareSizeY,
int squareSizeZ,
int visibleSizeX,
int visibleSizeY)
|
Method Summary |
int |
getBlockPositionX(int x,
int y,
int z)
Get the x block coordinate for a specific pixel drawing coordinate. |
int |
getBlockPositionY(int x,
int y,
int z)
Get the y block coordinate for a specific pixel drawing coordinate
The scrollling offset is used when calculating the block coordinate |
int |
getDrawingPositionX(float x,
float y,
float z)
|
int |
getDrawingPositionY(float x,
float y,
float z)
|
int |
getPixelDrawingPositionX(float x,
float y,
float z)
|
int |
getPixelDrawingPositionY(float x,
float y,
float z)
|
int |
getPositionX(float x,
float y,
float z)
|
int |
getPositionY(float x,
float y,
float z)
|
int |
getScrollingSizeX()
Get the horizontal scrolling size |
int |
getScrollingSizeY()
Get the vertical scrolling size |
boolean |
getVisible(float posX,
float posY,
float posZ)
|
Methods inherited from class erland.game.tileadventure.BlockContainerData |
getDrawingSizeX, getDrawingSizeY, getOffsetX, getOffsetY, getScrollingOffsetX, getScrollingOffsetY, getSizeX, getSizeY, getSizeZ, getSquareSizeX, getSquareSizeY, getSquareSizeZ, setScrollingOffsetX, setScrollingOffsetY |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RectBlockContainerData
public RectBlockContainerData(int offsetX,
int offsetY,
int blockDrawingOffsetX,
int blockDrawingOffsetY,
int sizeX,
int sizeY,
int sizeZ,
int squareSizeX,
int squareSizeY,
int squareSizeZ,
int visibleSizeX,
int visibleSizeY)
getDrawingPositionX
public int getDrawingPositionX(float x,
float y,
float z)
getDrawingPositionY
public int getDrawingPositionY(float x,
float y,
float z)
getPositionX
public int getPositionX(float x,
float y,
float z)
getPositionY
public int getPositionY(float x,
float y,
float z)
getVisible
public boolean getVisible(float posX,
float posY,
float posZ)
getPixelDrawingPositionX
public int getPixelDrawingPositionX(float x,
float y,
float z)
getPixelDrawingPositionY
public int getPixelDrawingPositionY(float x,
float y,
float z)
getScrollingSizeX
public int getScrollingSizeX()
- Get the horizontal scrolling size
- Returns:
- The horizontal scrolling offset (Pixel coordinates)
getScrollingSizeY
public int getScrollingSizeY()
- Get the vertical scrolling size
- Returns:
- The vertical scrolling size (Pixel coordinates)
getBlockPositionX
public int getBlockPositionX(int x,
int y,
int z)
- Description copied from interface:
IrregularBlockContainerInterface
- Get the x block coordinate for a specific pixel drawing coordinate.
The scrollling offset is used when calculating the block coordinate
- Parameters:
x
- The x pixel coordinatey
- The y pixel coordinatez
- THe z pixel coordinate
- Returns:
- The x block cordinate
getBlockPositionY
public int getBlockPositionY(int x,
int y,
int z)
- Description copied from interface:
IrregularBlockContainerInterface
- Get the y block coordinate for a specific pixel drawing coordinate
The scrollling offset is used when calculating the block coordinate
- Parameters:
x
- The x pixel coordinatey
- The y pixel coordinatez
- The z pixel coordinate
- Returns:
- The y block cordinate
Copyright © 2003-2006 Erland Isaksson. All Rights Reserved.