|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgizmoball.graphics.WorldDrawer
public class WorldDrawer
The class that will draw, in 3D, the objects in the world. You pass in a WorldState object, containing all the game objects. To make changes in what is to be drawn, modify the passed in WorldState directly (and the objects that it holds).
Constructor Summary | |
---|---|
WorldDrawer(WorldState state)
Constructs a rendering instance |
|
WorldDrawer(WorldState state,
Vect3 initialCameraPos,
Vect3 initialLookAt)
Constructs a rendering instance, with the specified initial camera position |
Method Summary | |
---|---|
boolean |
cameraIsMoving()
|
void |
display(GLAutoDrawable drawable)
Renders all displayable objects |
void |
displayChanged(GLAutoDrawable drawable,
boolean modeChanged,
boolean deviceChanged)
method required by GLEventListener interface |
void |
init(GLAutoDrawable gld)
performs the initialization of the scene |
void |
reshape(GLAutoDrawable drawable,
int x,
int y,
int width,
int height)
method required by GLEventListener interface |
void |
setCamera(Vect3 newPosition)
Sets the camera to a new location. |
void |
setLookAt(Vect3 newLookat)
Sets the camera look at to a new location. |
void |
translateCamera(Vect3 diff)
Moves the camera by a specified amount. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WorldDrawer(WorldState state)
public WorldDrawer(WorldState state, Vect3 initialCameraPos, Vect3 initialLookAt)
Method Detail |
---|
public void init(GLAutoDrawable gld)
javax.media.opengl.GLEventListener#init(javax.media.opengl.GLAutoDrawable)
public void display(GLAutoDrawable drawable)
javax.media.opengl.GLEventListener#display(javax.media.opengl.GLAutoDrawable)
public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height)
public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged)
public void translateCamera(Vect3 diff)
public void setCamera(Vect3 newPosition)
public boolean cameraIsMoving()
public void setLookAt(Vect3 newLookat)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |