public class SimMap
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
SimMap(java.util.Map<Coord,MapNode> nodes) |
| Modifier and Type | Method and Description |
|---|---|
Coord |
getMaxBound()
Returns the lower right corner coordinate of the map
|
Coord |
getMinBound()
Returns the upper left corner coordinate of the map
|
MapNode |
getNodeByCoord(Coord c)
Returns a MapNode at given coordinates or null if there's no MapNode in
the location of the coordinate
|
java.util.List<MapNode> |
getNodes()
Returns all the map nodes in a list
|
Coord |
getOffset()
Returns the offset that has been caused by translates made to this map
(does NOT take into account mirroring).
|
java.util.List<MapNode> |
getPois()
Returns the POI list
|
boolean |
isMirrored()
Returns true if this map has been mirrored after reading
|
void |
mirror()
Mirrors all map coordinates around X axis (x'=x, y'=-y).
|
void |
setPois(java.util.List<MapNode> pois)
Set the list of POIs
|
java.lang.String |
toString()
Returns a String representation of the map
|
void |
translate(double dx,
double dy)
Translate whole map by dx and dy
|
public java.util.List<MapNode> getNodes()
public MapNode getNodeByCoord(Coord c)
c - The coordinatepublic Coord getMinBound()
public Coord getMaxBound()
public Coord getOffset()
public boolean isMirrored()
mirror()public void translate(double dx,
double dy)
dx - The amount to translate X coordinatesdy - the amount to translate Y coordinatespublic void mirror()
public java.lang.String toString()
toString in class java.lang.Objectpublic void setPois(java.util.List<MapNode> pois)
pois - public java.util.List<MapNode> getPois()