public class TileBoundle
extends java.lang.Object
implements java.io.Serializable
A set of tiles.
The difference with TileMatrix is that, TileMatrix represents a rectangle, but TileBundle means a set of continuous tiles(not necessarily rectangle).
The following tiles are represented by TileBundle: start(3,1) end(5,3) rectLeft:1 width:11
-------------
---*********-
-***********-
-*****-------
| Modifier and Type | Field and Description |
|---|---|
TileIndex |
end
End tile.
|
int |
rectLeft
The left region column number.
|
int |
rectWidth
Area width.
|
TileIndex |
start
Start tile.
|
| Constructor and Description |
|---|
TileBoundle(int startX, int startY, int endX, int endY, int rectLeft, int width)
The Constructor.
|
TileBoundle(TileIndex start, TileIndex end, int rectLeft, int width)
The Constructor.
|
public final TileIndex start
public final TileIndex end
public final int rectLeft
public final int rectWidth
public TileBoundle(TileIndex start, TileIndex end, int rectLeft, int width)
The Constructor.
start - Tile start number.end - Tile end number.rectLeft - Region left row numberwidth - Number of region horizontal tiles.
public TileBoundle(int startX,
int startY,
int endX,
int endY,
int rectLeft,
int width)
The Constructor.
startX - Start tile column number.startY - Start tile row number.endX - End tile row number.endY - End tile column number.rectLeft - Region left row number.width - Number of region horizontal tiles.public long tileCount()
Tile number.
public TileIndex getTile(long index)
Gets the tile row number according to the current tile index.
index - Tile index..