katerlib
Class Kater

java.lang.Object
  extended by katerlib.Kater
All Implemented Interfaces:
IKaterEventDispatcher

public class Kater
extends java.lang.Object
implements IKaterEventDispatcher


Constructor Summary
Kater(processing.core.PApplet p, TuioProcessing tuio, int theID)
          The single Kater object has to be created with a reference to the PApplet, the Tuio and the referencing tuioID
 
Method Summary
 void addActionListener(IKaterEventListener listener)
          add an event Listener
 void dispatchFinish()
          dispatch the finish event
 float getAngle()
           
 float getCenterX()
           
 float getCenterY()
           
 java.lang.Boolean getDebug()
           
 int getID()
           
 float getX()
           
 float getY()
           
 void lightsOff()
          turn the lights on the Kater off
 void lightsOn()
          turn the lights on the Kater on
 void removeActionListener(IKaterEventListener listener)
          remove an event Listener
 void setDebug(java.lang.Boolean debug)
          sets the debug State
 void startrun()
          set the running state to true
 void toggleDebug()
          Toggles the Debug State
 void update(float theX, float theY, float theAngle)
          Update the Kater each frame with his Coordiantes and Angle from TUIO
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Kater

public Kater(processing.core.PApplet p,
             TuioProcessing tuio,
             int theID)
The single Kater object has to be created with a reference to the PApplet, the Tuio and the referencing tuioID

Parameters:
p - The processing PApplet
tuio - The TUIO Processing Client
theID - The TUIO ID of the Kater
Method Detail

update

public void update(float theX,
                   float theY,
                   float theAngle)
Update the Kater each frame with his Coordiantes and Angle from TUIO

Parameters:
theX -
theY -
theAngle -

getX

public float getX()
Returns:
the X Coordinate

getY

public float getY()
Returns:
the Y Coordinate

getCenterX

public float getCenterX()
Returns:
the Center X

getCenterY

public float getCenterY()
Returns:
the Center Y

getID

public int getID()
Returns:
the TUIO ID

startrun

public void startrun()
set the running state to true


getAngle

public float getAngle()
Returns:
the angle

dispatchFinish

public void dispatchFinish()
dispatch the finish event

Specified by:
dispatchFinish in interface IKaterEventDispatcher

lightsOn

public void lightsOn()
turn the lights on the Kater on


lightsOff

public void lightsOff()
turn the lights on the Kater off


addActionListener

public void addActionListener(IKaterEventListener listener)
add an event Listener

Specified by:
addActionListener in interface IKaterEventDispatcher
Parameters:
listener - a Listener for Kater Eventdispatch

removeActionListener

public void removeActionListener(IKaterEventListener listener)
remove an event Listener

Parameters:
listener - a Listener for Kater Eventdispatch

getDebug

public java.lang.Boolean getDebug()
Returns:
the debug State

setDebug

public void setDebug(java.lang.Boolean debug)
sets the debug State

Parameters:
debug - Boolean if debug should be drawn or not

toggleDebug

public void toggleDebug()
Toggles the Debug State



processing library ktrLib by Christoph Steinlehner. (c) 2011