public class TilingScheme.TilePosition
extends java.lang.Object
implements java.lang.Cloneable
Constructor and Description |
---|
TilePosition(int row,
int col)
Creates a new tile position from tile coordinates.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
boolean |
contains(int row,
int col)
Determines if a global coordinate is contained in the tile at
this position.
|
boolean |
equals(java.lang.Object o) |
int[] |
getCoords()
Gets the position coordinates.
|
int[] |
getDimensions()
Gets the dimensions of the tile at this position.
|
TilingScheme |
getScheme()
Gets the tiling scheme for this position.
|
int[] |
getStart()
Gets the starting global coordinates of the tile at this position.
|
int |
hashCode() |
java.lang.String |
toString() |
public TilePosition(int row, int col)
row
- the tile row coordinate.col
- the tile column coordinate.java.lang.IndexOutOfBoundsException
- if the coordinates do not reference
a valid tile in the tiling scheme.public java.lang.String toString()
toString
in class java.lang.Object
public int[] getCoords()
public int[] getDimensions()
public int[] getStart()
public int hashCode()
hashCode
in class java.lang.Object
public boolean contains(int row, int col)
row
- the global row coordinate.col
- the global column coordinate.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
public TilingScheme getScheme()