viewer
Class Viewer

java.lang.Object
  extended by viewer.Viewer

public class Viewer
extends java.lang.Object

The window and general information for the viewer.

Author:
Henry Gross, Ed Williams

Constructor Summary
Viewer(boolean fullscreen, boolean startServer)
          Create a new viewer and load everything up
 
Method Summary
 void forceModel(Model m)
          Set a specific model for the GLViewer, instead of loading a map
 void forceModelSameGL(Model m)
           
 void forceModelSameGL(Model m, boolean forceRender)
           
static java.lang.String getDataPath()
           
 boolean getFullscreen()
          return the fullscreen state of the window
 javax.media.opengl.GL getGL()
          Accesses the GL object belonging to the GLViewer.
 GLViewer getGLViewer()
          Accesses the GL viewer
static java.lang.String getPath()
           
 java.util.ArrayList<java.lang.Double[]> getPeople()
          return and array of the position of the people on the map
 java.awt.Rectangle getSize()
          Return the size of the screem
 void loadMap(java.lang.String filename)
          loads the map that the program will use
static void main(java.lang.String[] args)
           
 void refreshWindow()
          if something changes, his is the easiest way to refresh everything to make the changes be applied
 void setFullscreen(boolean b)
          Set whether the window is fullscreen is not
 void setSize(int x, int y)
          Set the size of the window
 void updatePeople(java.lang.String key, java.lang.Double x, java.lang.Double y, java.lang.Double z)
          Update the position of the people
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Viewer

public Viewer(boolean fullscreen,
              boolean startServer)
Create a new viewer and load everything up

Method Detail

getPath

public static java.lang.String getPath()

getDataPath

public static java.lang.String getDataPath()

main

public static void main(java.lang.String[] args)
Parameters:
args -

refreshWindow

public void refreshWindow()
if something changes, his is the easiest way to refresh everything to make the changes be applied


loadMap

public void loadMap(java.lang.String filename)
loads the map that the program will use

Parameters:
filename - the name of the file to load

forceModel

public void forceModel(Model m)
Set a specific model for the GLViewer, instead of loading a map

Parameters:
m - the model instance to use

forceModelSameGL

public void forceModelSameGL(Model m)

forceModelSameGL

public void forceModelSameGL(Model m,
                             boolean forceRender)

setSize

public void setSize(int x,
                    int y)
Set the size of the window

Parameters:
x - the x dimension
y - the y dimension

updatePeople

public void updatePeople(java.lang.String key,
                         java.lang.Double x,
                         java.lang.Double y,
                         java.lang.Double z)
Update the position of the people

Parameters:
key - the key for the person to update
x - the x coordinate
y - the y coordinate
z - the z coordinate

getPeople

public java.util.ArrayList<java.lang.Double[]> getPeople()
return and array of the position of the people on the map

Returns:
array of the position of the people on the map

setFullscreen

public void setFullscreen(boolean b)
Set whether the window is fullscreen is not

Parameters:
b - true to make the window fullscreen

getFullscreen

public boolean getFullscreen()
return the fullscreen state of the window

Returns:
true if the window is fullscreen

getSize

public java.awt.Rectangle getSize()
Return the size of the screem

Returns:
the size of the screen

getGL

public javax.media.opengl.GL getGL()
Accesses the GL object belonging to the GLViewer. Specifically, used by The Preditor to save a new model.

Returns:
GL belonging to the GLViewer

getGLViewer

public GLViewer getGLViewer()
Accesses the GL viewer

Returns:
the glViewer instance