SETOServer

superclass: [Object]


/*

Author: 

Till Bovermann 

2007

Neuroinformatics Group

Bielefeld University

Germany

2006

SonEnvir IEM

KUG Graz

Austria

*/


a server fulfilling the TUIO-Specs.

drawbacks:

no 'P' symbols are yet handled...


*new(formatString, setoClass)

formatString a format String (explained in [SETObject])

netaddr a netaddr default nothing, listening to all. 

setoClass the Class of the created objects. 

Must be a subclass of [SETObject], defaults to SETObject.


set(id, args)

id the unique id of the object to be set

args list of arguments in the order as determined by the formatString


alive(ids)

ids list of ids of all visible objects


allAlive

indicates that all objects visible before are still visible.


visibleObjs

returns a list of all currently visible objects.


gui

creates a gui representing recognized objects



Examples


GUI.swing;

GUI.cocoa;

SwingOSC.default.boot;

SwingOSC.default.quit;



// add and remove some objects

t = SETOServer("_ixyzuvw", SETObject);

t.gui


t.set(0, [3, 0.3, 0.7, 0.5, 0.2, 0.4, 0.1])

t.alive([0])

t.set(1, [1, 0.41, 0.72, 0.5, 0.2, 0.4, 0.1])

t.alive([0,1])

t.visibleObjs


t.set(1, [3, 0, 0.17, 0.5, 0.2, 0.4, 0.1]);

t.set(2, [1, 0.15, 0.19, 0.5, 0.2, 0.4, 0.1]);

t.alive([0, 1, 2]);

t.visibleObjs;


t.alive([]);

t.visibleObjs;

t.visibleObjs


// rotated objects in euler mode

t = SETOServer("_ixya", SETObject);

t.gui;


t.set(0, [3, 0.3, 0.7, 0      ]); t.alive([0])

t.set(0, [3, 0.3, 0.7, 0.25pi ]); t.alive([0])

t.set(0, [3, 0.3, 0.7, 0.125pi]); t.alive([0])

t.set(0, [2, 0.3, 0.7, 0]); t.alive([0])


t.alive([]);

t.visibleObjs;