com.ericsson.tic.vi
Class WorldTimer

java.lang.Object
  extended by java.util.TimerTask
      extended by com.ericsson.tic.vi.WorldTimer
All Implemented Interfaces:
Runnable

public class WorldTimer
extends TimerTask

Performs and schedules updates to the world state.

Version:
1.0 (2008-12-04)
Author:
Sami Matilainen

Field Summary
private  Camera camera
          The camera which is associated with the renderer.
private  ViewPanel pv
          The viewpanel which is the parent of the renderer.
private  Renderer r
          The renderer that this timer is associated with.
 
Constructor Summary
WorldTimer(Renderer r, Camera camera, ViewPanel pv)
          Creates a timer.
 
Method Summary
 void run()
          Schedules calls to the update function at regular intervalls.
 void updateWorld()
          Updates the world state.
 
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

r

private Renderer r
The renderer that this timer is associated with.


camera

private Camera camera
The camera which is associated with the renderer.


pv

private ViewPanel pv
The viewpanel which is the parent of the renderer.

Constructor Detail

WorldTimer

public WorldTimer(Renderer r,
                  Camera camera,
                  ViewPanel pv)
Creates a timer.

Method Detail

run

public void run()
Schedules calls to the update function at regular intervalls.

Specified by:
run in interface Runnable
Specified by:
run in class TimerTask

updateWorld

public void updateWorld()
Updates the world state.