and waaay faster than me - passed out and dreamed code....only problem it was even more confusing in the dream.. I really appreciate you two helping understand this (slowly)
yes, that is why i was trying to call zot.cellcheck, so ok i only had that partly screwed up. unfortunately there is no partly screwed up in code lol...
so, ejected out of a couple hours 'rest', the next iteration continues to be problematic:
most of the class TuioLoader is taken directly from an example in the TuioProcessing distribution, that section is below
so now I'm getting 'The constructor TuioProcessing(this_sketch.TuioLoader) is undefined'
i have this feeling that somehow building a class this way is not allowed, or I broke the implementation trying to put the example into a class (I'm trying to make my program more 'modular' if that makes any sense..)
anyway, if anyone can again point out what is probably obvious, or direct me in the correct way to understand the logical flow or correct syntax, I am again in your debt
class TuioLoader {
////////requires TUIO Processing
////works best with Sony PS3 Eye cam
/*
portions of this code from
TUIO processing demo - part of the reacTIVision project
http://reactivision.sourceforge.net/
Copyright (c) 2005-2009 Martin Kaltenbrunner <
mkalten@iua.upf.edu>
GNU General Public License, version 2 and later
*/
import TUIO.*;
TuioProcessing tuioClient;
float cursor_size = 40;
float object_size = 60;
float table_size = 480;
float scale_factor = 10;
TuioObject tobj;
//constructor
TuioLoader() {
size(640,480);
noStroke();
fill(0);
smooth();
loop();
scale_factor = height/table_size;
tuioClient = new TuioProcessing(this);
}
// within the TuioTracking method we retrieve a Vector (List) of TuioObject and TuioCursor (polling)
// from the TuioProcessing client and then loop over both lists to draw the graphical feedback.
void TuioTracking() {
background(0);
float obj_size = object_size*scale_factor;
float cur_size = cursor_size*scale_factor;
//make a list (java Vector) of all the objects
Vector tuioObjectList = tuioClient.getTuioObjects();
for (int i=0; i<tuioObjectList.size(); i++) {
TuioObject tobj = (TuioObject)tuioObjectList.elementAt(i);
}
//draw Tuio tracking blobs
Vector tuioCursorList = tuioClient.getTuioCursors();
for (int i=0;i<tuioCursorList.size();i++) {
TuioCursor tcur = (TuioCursor)tuioCursorList.elementAt(i);
fill(255);
ellipse( tcur.getScreenX(width), tcur.getScreenY(height),cur_size,cur_size);
}
}
///// these callback methods are called whenever a TUIO event occurs - this is directly copied from the example with no changes
// 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 after each message bundle
// representing the end of an image frame
void refresh(TuioTime bundleTime) {
//redraw();
}
}
///ps is it considered bad etiquette to paste code like this? should i do it line by line for 'conceptual block questions' like this?