|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmovement.map.SimMap
public class SimMap
A simulation map for node movement.
Constructor Summary | |
---|---|
SimMap(java.util.Map<Coord,MapNode> nodes)
|
Method Summary | |
---|---|
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). |
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). |
java.lang.String |
toString()
Returns a String representation of the map |
void |
translate(double dx,
double dy)
Translate whole map by dx and dy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SimMap(java.util.Map<Coord,MapNode> nodes)
Method Detail |
---|
public java.util.List<MapNode> getNodes()
public MapNode getNodeByCoord(Coord c)
c
- The coordinate
public 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.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |