|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.nutiteq.components.TileMapBounds
public class TileMapBounds
Defines map bounds on pixel map. Definition is done by valid minimum and maximum points on map. For example for a map, that has world at zoom level 0 in 256x256 tile, map bounds on zoom 0 would be min = (0, 0) and max = (255, 255)
| Constructor Summary | |
|---|---|
TileMapBounds(MapPos minPoint,
MapPos maxPoint)
Create tile map bounds. |
|
| Method Summary | |
|---|---|
MapPos |
calculateCorrection(MapPos middlePoint)
Calculate map position correction for it to be within map bounds. |
MapPos |
getMaxPoint()
|
MapPos |
getMinPoint()
|
int |
getZoomLevel()
|
boolean |
intersectsWithBounds(int mapX,
int mapY,
int tileSize)
|
boolean |
isWithinBounds(int mapX,
int mapY)
Is given position on tile map within map bounds |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TileMapBounds(MapPos minPoint,
MapPos maxPoint)
minPoint - minimum valid point on mapmaxPoint - maximum valid point on map| Method Detail |
|---|
public boolean isWithinBounds(int mapX,
int mapY)
mapX - position xmapY - position y
public MapPos calculateCorrection(MapPos middlePoint)
middlePoint - point for witch to get the correction
public MapPos getMaxPoint()
public MapPos getMinPoint()
public int getZoomLevel()
public boolean intersectsWithBounds(int mapX,
int mapY,
int tileSize)
public 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 | ||||||||