hermes
Class Hermes

java.lang.Object
  extended by hermes.Hermes

public class Hermes
extends java.lang.Object

Library class for broad scale static helpers, storage of PApplet


Constructor Summary
Hermes()
           
 
Method Summary
static PApplet getPApplet()
          Returns the PApplet that Hermes is running in.
static float getTimeScale()
          Returns the Hermes time scale.
static void setPApplet(PApplet parentApplet)
          Set the PApplet that all utilities use.
static void setTimeScale(float scale)
          Sets the time scale for calculating motion and physics.
static void unsafeSleep(long time)
          Causes the calling thread to sleep, catches InterruptedException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Hermes

public Hermes()
Method Detail

setTimeScale

public static void setTimeScale(float scale)
Sets the time scale for calculating motion and physics. This is seconds/unit, so a value of 2 will mean each 2 seconds correspond to one time unit.

Parameters:
scale -

getTimeScale

public static float getTimeScale()
Returns the Hermes time scale.

Returns:
the time scale

getPApplet

public static PApplet getPApplet()
Returns the PApplet that Hermes is running in.


setPApplet

public static void setPApplet(PApplet parentApplet)
Set the PApplet that all utilities use. Called Hermes.setPApplet(this) before doing anything else!


unsafeSleep

public static void unsafeSleep(long time)
Causes the calling thread to sleep, catches InterruptedException.

Parameters:
time - the time (in milliseconds) to sleep