Laxkit
0.0.7.1
|
Classes | |
class | Laxkit::TouchObject |
Basically a LaxMouse for touch objects. More... | |
class | Laxkit::TUIOListener |
Class to listen to TUIO events on a specified port. More... |
Functions | |
int | Laxkit::SetupTUIOListener (const char *port) |
Define and install a new TUIOTouchPointer into your application. | |
void | Laxkit::error_handler (int num, const char *msg, const char *where) |
Error handling for TUIOListener. | |
int | Laxkit::tuio_handler (const char *path, const char *types, lo_arg **argv, int argc, void *, void *user_data) |
Laxkit::TouchObject::TouchObject (int touchid) | |
Initialize a new touch object, with active==1. | |
virtual int | Laxkit::TouchObject::getInfo (anXWindow *win, int *screen, anXWindow **child, int *x, int *y, unsigned int *mods, double *pressure, double *tiltx, double *tilty) |
virtual int | Laxkit::TouchObject::Set (double xx, double yy, double xxv, double yyv, double aa) |
Update the object's state. | |
Laxkit::TUIOListener::TUIOListener (const char *port) | |
virtual int | Laxkit::TUIOListener::Start () |
Start listening for events. | |
virtual int | Laxkit::TUIOListener::Stop () |
Stop listening for events. | |
virtual int | Laxkit::TUIOListener::fd () |
Return a file descriptor used to break anXApp out of its select() call. | |
virtual int | Laxkit::TUIOListener::tuioHandler (int argc, lo_arg **argv, const char *types) |
Handler for tuio events. |
TUIO (http://www.tuio.org/?specification) is a protocol for sending touch table messages inside Open Sound Control messages.
|
virtual |
Update the object's state.
If firsttime==1, then return 1 after setting. Otherwise return 0.
Referenced by Laxkit::TUIOListener::tuioHandler().
Define and install a new TUIOTouchPointer into your application.
Default port is 3333.
See nuigroup.com for lots of ways to make your own big touch table.
References Laxkit::TUIOListener::Start().
|
virtual |
Start listening for events.
Return 1 for unable to start, 0 for success.
Referenced by Laxkit::SetupTUIOListener().
|
virtual |
Stop listening for events.
Return 1 for unable to stop, 0 for success.
int Laxkit::tuio_handler | ( | const char * | path, |
const char * | types, | ||
lo_arg ** | argv, | ||
int | argc, | ||
void * | , | ||
void * | user_data | ||
) |
Basically, just pass off to TUIOListener::tuio_handler().
References Laxkit::TUIOListener::tuioHandler().
Handler for tuio events.
TUIO messages can be "set", "alive", or "fseq". (as of the 1.1 specification, anyway)
Idling will produce alternating "alive" and "fseq" messages. "alive" says what tuio objects exist. "fseq" wraps up preceding "set" messages into one frame.
For alive, argument indices > 0 will contain integer id numbers of tuio objects. It is up to the application to figure out if this means there is a new object or an object has gone away.
fseq messages contain one argument with the current frame number of all set messages between the fseq and the last alive message.
set messages have:
/tuio/2Dobj set id i x y a X Y A m r /tuio/2Dcur set id xpos ypos Xvelocity Yvelocity acceleration /tuio/2Dblb set id x y a w h f X Y A m r
References Laxkit::LaxMouse::buttonwindow, Laxkit::TouchObject::Set(), and Laxkit::anXWindow::WindowTitle().
Referenced by Laxkit::tuio_handler().