Flight Club


flightclub.client
Class ThermalTrigger

java.lang.Object
  |
  +--flightclub.client.ThermalTrigger
All Implemented Interfaces:
CameraSubject, ClockObserver

public class ThermalTrigger
extends java.lang.Object
implements ClockObserver, CameraSubject

This class implements a thermal trigger. Every cycle the trigger releases a bubble of warm air that floats up to produce a cloud. Well, that is the impression we hopefully evoke. The trigger model contains lots of dubious assumptions and gross simplifacations. Good ! We add a veneer of noise to the otherwise clockwork like behaviour of the trigger without departing from the deterministic model. TODO: destroyMe


Constructor Summary
ThermalTrigger(ModelViewer modelViewer, int x, int y, int cloudSize, float t0)
          Creates a trigger at (x, y).
 
Method Summary
static float getCycle(int size)
          Returns the cycle length for a given cloud size.
 float[] getEye()
           
 float[] getFocus()
           
 void tick(float t, float dt)
          Make a cloud every cycle period of time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThermalTrigger

public ThermalTrigger(ModelViewer modelViewer,
                      int x,
                      int y,
                      int cloudSize,
                      float t0)
Creates a trigger at (x, y). t is the current time and t0 is the time that the trigger creates its first bubble. We may have t > t0. In this case we need to calculate the number of clouds that this trigger has already produced. TODO: look back in time to see what clouds this trigger has already produced which still exist and produce them !

Method Detail

tick

public void tick(float t,
                 float dt)
Make a cloud every cycle period of time.

Specified by:
tick in interface ClockObserver

getCycle

public static float getCycle(int size)
Returns the cycle length for a given cloud size.


getFocus

public float[] getFocus()
Specified by:
getFocus in interface CameraSubject

getEye

public float[] getEye()
Specified by:
getEye in interface CameraSubject

Dan Burton <danb@dircon.co.uk> | latest update: 20 Sep 2002;