RiverRat - An MIT iCampus project | http://web.mit.edu/riverrat/ |
Public Member Functions | |
float | getAspect () |
Returns a float that specifies the ratio of width to height of the target. | |
boolean | isFixedAspect () |
Returns true if the aspect is fixed. | |
void | setAspect (float asp) |
Sets the aspect ratio of the Map. | |
float | getLonFromX (float x) |
Returns a longitude in decimal degrees that corresponds to a given x value from 0.0 to 1.0f If x is out of range, x is reset to the nearest edge. | |
float | getLatFromY (float y) |
Returns a latitude in decimal degrees that corresponds to a given y value from 0.0 to 1.0f If y is out of range, y is reset to the nearest edge. | |
float | getXFromLon (float lon) |
Returns an x value from 0.0 to 1.0 that corresponds to a given longitude on the map. | |
float | getYFromLat (float lat) |
Returns an y value from 0.0 to 1.0 that corresponds to a given latitude on the map. | |
float | getWidth () |
Returns the width in decimal degrees of a Map. | |
float | getHeight () |
Returns the height in decimal degrees of a Map. | |
float | getNorthLat () |
Returns the latitude of the northern edge of a Map. | |
float | getSouthLat () |
Returns the latitude of the southern edge of a Map. | |
float | getWestLon () |
Returns the longitude of the western edge of a Map. | |
float | getEastLon () |
Returns the longitude of the eastern edge of Map. | |
Package Functions | |
Map () | |
Default Constructor. | |
Map (Fix f1, Fix f2) | |
Constructor. | |
Static Package Attributes | |
final boolean | DEBUG = false |
The first version of this class is complete.
Definition at line 9 of file Map.java.
|
Default Constructor. Creates a Map with two Fixes as its corners. |
|
Constructor. Takes any two opposite corners of a box and makes a map with the appropriate dimensions and corners.
Definition at line 34 of file Map.java. References riverrat.Fix.getLat(), and riverrat.Fix.getLon(). |
|
Returns a float that specifies the ratio of width to height of the target.
Definition at line 70 of file Map.java. References riverrat.Map.getHeight(), and riverrat.Map.getWidth(). |
|
Returns the longitude of the eastern edge of Map.
Definition at line 234 of file Map.java. References riverrat.Fix.getLon(). Referenced by riverrat.Map.getLonFromX(). |
|
Returns the height in decimal degrees of a Map.
Definition at line 198 of file Map.java. References riverrat.Fix.getLat(). Referenced by riverrat.Map.getAspect(), riverrat.Map.getLatFromY(), riverrat.Map.getYFromLat(), and riverrat.Map.setAspect(). |
|
Returns a latitude in decimal degrees that corresponds to a given y value from 0.0 to 1.0f If y is out of range, y is reset to the nearest edge.
Definition at line 132 of file Map.java. References riverrat.Map.getHeight(), and riverrat.Map.getSouthLat(). |
|
Returns a longitude in decimal degrees that corresponds to a given x value from 0.0 to 1.0f If x is out of range, x is reset to the nearest edge.
Definition at line 118 of file Map.java. References riverrat.Map.getEastLon(), and riverrat.Map.getWidth(). |
|
Returns the latitude of the northern edge of a Map.
Definition at line 207 of file Map.java. References riverrat.Fix.getLat(). |
|
Returns the latitude of the southern edge of a Map.
Definition at line 216 of file Map.java. References riverrat.Fix.getLat(). Referenced by riverrat.Map.getLatFromY(), and riverrat.Map.getYFromLat(). |
|
Returns the longitude of the western edge of a Map.
Definition at line 225 of file Map.java. References riverrat.Fix.getLon(). Referenced by riverrat.Map.getXFromLon(). |
|
Returns the width in decimal degrees of a Map.
Definition at line 189 of file Map.java. References riverrat.Fix.getLon(). Referenced by riverrat.Map.getAspect(), riverrat.Map.getLonFromX(), riverrat.Map.getXFromLon(), and riverrat.Map.setAspect(). |
|
Returns an x value from 0.0 to 1.0 that corresponds to a given longitude on the map.
Definition at line 145 of file Map.java. References riverrat.Map.getWestLon(), and riverrat.Map.getWidth(). |
|
Returns an y value from 0.0 to 1.0 that corresponds to a given latitude on the map.
Definition at line 168 of file Map.java. References riverrat.Map.getHeight(), and riverrat.Map.getSouthLat(). |
|
Returns true if the aspect is fixed.
|
|
Sets the aspect ratio of the Map. Used for resizing.
Definition at line 88 of file Map.java. References riverrat.Map.getHeight(), and riverrat.Map.getWidth(). |