|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.gatech.cs2335.lemmings.graphics.Renderer
The Lemmings Renderer Takes care of drawing stuff to screen
| Field Summary | |
static boolean |
DEBUG
Display a lot of debug information? |
static boolean |
VERBOSE
Display debug information? |
| Constructor Summary | |
Renderer(Level l,
java.awt.Rectangle disp)
Creates a new Renderer instance. |
|
| Method Summary | |
void |
calculateWaterLevel()
Once the level has been set, calculates how water needs to be drawn. |
java.awt.Rectangle |
getDisplay()
Get the value of display. |
Level |
getLevel()
Get the value of level. |
java.awt.Dimension |
getMapSize()
Get the value of mapSize. |
java.awt.Rectangle |
getMapViewPort()
accessor for renderer |
java.awt.Point |
getMouseCoordinates()
Describe getMouseCoordinates method here. |
java.awt.Point |
getScrollRate()
Describe getScrollRate method here. |
Lemming |
getSelectedLemming()
Describe getSelectedLemming method here. |
int |
getZoomFactor()
Get the value of zoomFactor. |
static void |
main(java.lang.String[] args)
|
java.awt.Point |
mouseToWorld(java.awt.Point c)
Converts mouse coordinates to world coordinates. |
void |
rerenderTerrain()
Rerenders the terrain. |
void |
scroll(java.awt.Point offset)
Scroll the map by offset in the x-y directions. |
void |
setDisplay(java.awt.Rectangle v)
Set the value of display. |
void |
setLevel(Level v)
Set the value of level. |
protected void |
setMapSize(java.awt.Dimension v)
Set the value of mapSize. |
void |
setMouseCoordinates(java.awt.Point coord)
Describe setMouseCoordinates method here. |
void |
setZoomFactor(int v)
Set the value of zoomFactor. |
java.lang.String |
toString()
Returns a string representation of the renderer. |
void |
updateCursor()
Updates the cursor. |
boolean |
updateFrame(java.awt.Graphics target)
Update a given Graphics Frame |
java.awt.Point |
worldToMouse(java.awt.Point c)
Converts world coordinates to mouse coordinates. |
void |
zoomIn()
Zooms in. |
void |
zoomOut()
Zooms out. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final boolean VERBOSE
public static final boolean DEBUG
| Constructor Detail |
public Renderer(Level l,
java.awt.Rectangle disp)
Renderer instance.
l - The level that we will be rendering.disp - The display bounds.| Method Detail |
public void updateCursor()
public java.awt.Rectangle getMapViewPort()
public Level getLevel()
public void setLevel(Level v)
v - Value to assign to level.public java.awt.Rectangle getDisplay()
public void setDisplay(java.awt.Rectangle v)
v - Value to assign to display.public java.awt.Dimension getMapSize()
protected void setMapSize(java.awt.Dimension v)
v - Value to assign to mapSize.public int getZoomFactor()
public void setZoomFactor(int v)
v - Value to assign to zoomFactor.public void zoomIn()
public void zoomOut()
public void scroll(java.awt.Point offset)
offset - the amount to offsetpublic java.awt.Point getScrollRate()
getScrollRate method here.
Point valuepublic java.awt.Point getMouseCoordinates()
getMouseCoordinates method here.
Point valuepublic void setMouseCoordinates(java.awt.Point coord)
setMouseCoordinates method here.
coord - a Point valuepublic java.awt.Point mouseToWorld(java.awt.Point c)
c - a Point value
Point valuepublic java.awt.Point worldToMouse(java.awt.Point c)
c - a Point value
Point valuepublic boolean updateFrame(java.awt.Graphics target)
target - the frame to update
public void calculateWaterLevel()
public Lemming getSelectedLemming()
getSelectedLemming method here.
Lemming valuepublic void rerenderTerrain()
public java.lang.String toString()
String valuepublic static void main(java.lang.String[] args)
args - args
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||