|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkaterlib.KaterKontrol
public class KaterKontrol
Field Summary | |
---|---|
static java.lang.String |
VERSION
|
Constructor Summary | |
---|---|
KaterKontrol(processing.core.PApplet theParent,
TuioProcessing tuioClient,
int[] katerTuioIds)
The KaterKontrol Constructor which needs a Reference to PApplet, TUIO and an array with Fiducial IDs |
Method Summary | |
---|---|
void |
dispose()
Should only called by Processing. |
void |
draw()
Kater will be drawn in the Processing Draw Cycle |
java.lang.Boolean |
getDebug()
|
Kater |
getKaterById(int katerId)
Returns a Kater Object by its Fiducial ID |
void |
KaterGoTo(Kater kater,
float theX,
float theY)
send a Kater by its Object to a Coordinate |
void |
KaterIdGoTo(int katerId,
float theX,
float theY)
send a Kater by its Fiducial ID to a Coordinate |
void |
keyEvent(java.awt.event.KeyEvent e)
|
void |
onActionStateChange(IKaterEventDispatcher dispatcher,
EKaterEventState theState)
|
void |
pre()
Kater will be update in the Processing Pre Cycle |
void |
setDebug(java.lang.Boolean debug)
|
void |
toggleDebug()
|
static java.lang.String |
version()
return the version of the library. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String VERSION
Constructor Detail |
---|
public KaterKontrol(processing.core.PApplet theParent, TuioProcessing tuioClient, int[] katerTuioIds)
theParent
- Reference to the PApplet (usually this)tuioClient
- Reference to the TUIOProcessing ClientkaterTuioIds
- An Array of ints with the Fiducial IDs
import katerlib.*; import TUIO.*; KaterKontrol katerkontrol; TuioProcessing tuioClient; int[] katerIDs = {8,9}; void setup() { size(800,600); tuioClient= new TuioProcessing(this); katerkontrol = new KaterKontrol(this, tuioClient, katerIDs); katerkontrol.KaterIdGoTo(8,400,300); } void draw() { background(125); } // these callback methods are called whenever a TUIO event occurs // called when an object is added to the scene void addTuioObject(TuioObject tobj) { // println("add object "+tobj.getSymbolID()+" ("+tobj.getSessionID()+") "+tobj.getX()+" "+tobj.getY()+" "+tobj.getAngle()); } // called when an object is removed from the scene void removeTuioObject(TuioObject tobj) { // println("remove object "+tobj.getSymbolID()+" ("+tobj.getSessionID()+")"); } // called when an object is moved void updateTuioObject (TuioObject tobj) { // println("update object "+tobj.getSymbolID()+" ("+tobj.getSessionID()+") "+tobj.getX()+" "+tobj.getY()+" "+tobj.getAngle()+" "+tobj.getMotionSpeed()+" "+tobj.getRotationSpeed()+" "+tobj.getMotionAccel()+" "+tobj.getRotationAccel()); } // called when a cursor is added to the scene void addTuioCursor(TuioCursor tcur) { // println("add cursor "+tcur.getCursorID()+" ("+tcur.getSessionID()+ ") " +tcur.getX()+" "+tcur.getY()); } // called when a cursor is moved void updateTuioCursor (TuioCursor tcur) { // println("update cursor "+tcur.getCursorID()+" ("+tcur.getSessionID()+ ") " +tcur.getX()+" "+tcur.getY()+" "+tcur.getMotionSpeed()+" "+tcur.getMotionAccel()); } // called when a cursor is removed from the scene void removeTuioCursor(TuioCursor tcur) { // println("remove cursor "+tcur.getCursorID()+" ("+tcur.getSessionID()+")"); } // called when a Kater has started void katerStarted( Kater k ){ println("Kater with id "+k.getID()+" has started"); } // called when a Kater has finished void katerFinished( Kater k ){ println("Kater with id "+k.getID()+" has finished"); } // called after each message bundle // representing the end of an image frame void refresh(TuioTime bundleTime) { redraw(); }
Method Detail |
---|
public void pre()
public void draw()
public void KaterGoTo(Kater kater, float theX, float theY)
kater
- Reference to the Kater ObjecttheX
- X CoordinatetheY
- Y Coordinatepublic void KaterIdGoTo(int katerId, float theX, float theY)
katerId
- Fiducial ID of the KatertheX
- X CoordinatetheY
- Y Coordinatepublic Kater getKaterById(int katerId)
katerId
- Fiducial ID of the Kater
public void onActionStateChange(IKaterEventDispatcher dispatcher, EKaterEventState theState)
onActionStateChange
in interface IKaterEventListener
public static java.lang.String version()
public void dispose()
public void keyEvent(java.awt.event.KeyEvent e)
e
- the KeyEvent from @myParentpublic java.lang.Boolean getDebug()
public void setDebug(java.lang.Boolean debug)
public void toggleDebug()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |