|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--Road
This class models a roadway in our scene.
| Constructor Summary | |
Road(int x,
int y,
int width,
int height,
boolean east_west)
Construct the surface and the centerline of the road given the parameters. |
|
| Method Summary | |
void |
addTo(uwcse.graphics.GWindow g)
Add the elements of this display object to the graphics window. |
int |
getHeight()
Return the y-span of the Road. |
int |
getWidth()
Return the x-span of the Road. |
int |
getX()
Return the x-coordinate of the upper left corner of the Road. |
int |
getY()
Return the y-coordinate of the upper left corner of the Road. |
void |
removeFromWindow()
Remove the elements of this display object from the graphics window. |
boolean |
roadIsEastWest()
Returns a boolean regarding orientation of the Road |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Road(int x,
int y,
int width,
int height,
boolean east_west)
x - the x-coordinate of the upper left corner of the roady - the y-coordinate of the upper left corner of the roadwidth - the x-axis span of the roadheight - the y-axis span of the roadeast_west - the direction of the road; true means East-West, false means North-South| Method Detail |
public void addTo(uwcse.graphics.GWindow g)
addTo in interface uwcse.animation.Propg - the graphics window to usepublic void removeFromWindow()
removeFromWindow in interface uwcse.animation.Proppublic int getX()
public int getY()
public int getHeight()
public int getWidth()
public boolean roadIsEastWest()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||