diff -r 6c08d4d7219e -r 9ccef81f02ab front_idill/extern/fajran-npTuioClient/TuioClient/TuioContainer.h --- a/front_idill/extern/fajran-npTuioClient/TuioClient/TuioContainer.h Thu Apr 12 13:09:46 2012 +0200 +++ b/front_idill/extern/fajran-npTuioClient/TuioClient/TuioContainer.h Thu Apr 12 15:33:25 2012 +0200 @@ -1,9 +1,9 @@ /* - TUIO C++ Library - part of the reacTIVision project - http://reactivision.sourceforge.net/ + TUIO C++ Library - part of the reacTIVision project + http://reactivision.sourceforge.net/ - Copyright (c) 2005-2008 Martin Kaltenbrunner - + Copyright (c) 2005-2008 Martin Kaltenbrunner + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -19,6 +19,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* + Modified by alexandre.bastien@iri.centrepompidou.fr to manage TUIO strings. +*/ + #ifndef INCLUDED_TUIOCONTAINER_H #define INCLUDED_TUIOCONTAINER_H @@ -33,132 +37,132 @@ class TuioContainer: public TuioPoint { - protected: - long session_id; - float xpos, ypos, zpos; - float x_speed, y_speed; - float motion_speed, motion_accel; - std::list path; - - int state; - - public: - TuioContainer (long s_id, float xpos, float ypos):TuioPoint(xpos,ypos) { - this->session_id = s_id; - this->x_speed = 0.0f; - this->y_speed = 0.0f; - this->motion_speed = 0.0f; - this->motion_accel = 0.0f; - TuioPoint p(xpos,ypos); - path.push_back(p); - - state = TUIO_ADDED; - }; + protected: + long session_id; + float xpos, ypos, zpos; + float x_speed, y_speed; + float motion_speed, motion_accel; + std::list path; + + int state; + + public: + TuioContainer (long s_id, float xpos, float ypos):TuioPoint(xpos,ypos) { + this->session_id = s_id; + this->x_speed = 0.0f; + this->y_speed = 0.0f; + this->motion_speed = 0.0f; + this->motion_accel = 0.0f; + TuioPoint p(xpos,ypos); + path.push_back(p); + + state = TUIO_ADDED; + }; - /* - * Surchargé par alexandre.bastien@iri.centrepompidou.fr - */ - TuioContainer (long s_id, float xpos, float ypos, float zpos):TuioPoint(xpos,ypos,zpos) { - this->session_id = s_id; - this->x_speed = 0.0f; - this->y_speed = 0.0f; - this->motion_speed = 0.0f; - this->motion_accel = 0.0f; - TuioPoint p(xpos,ypos,zpos); - path.push_back(p); - - state = TUIO_ADDED; - }; + /* + * Surchargé par alexandre.bastien@iri.centrepompidou.fr + */ + TuioContainer (long s_id, float xpos, float ypos, float zpos):TuioPoint(xpos,ypos,zpos) { + this->session_id = s_id; + this->x_speed = 0.0f; + this->y_speed = 0.0f; + this->motion_speed = 0.0f; + this->motion_accel = 0.0f; + TuioPoint p(xpos,ypos,zpos); + path.push_back(p); + + state = TUIO_ADDED; + }; - /* - * Modifié par alexandre.bastien@iri.centrepompidou.fr - */ - TuioContainer (TuioContainer *tuioContainer):TuioPoint(tuioContainer) { - this->session_id = tuioContainer->getSessionID(); - this->x_speed = 0.0f; - this->y_speed = 0.0f; - this->motion_speed = 0.0f; - this->motion_accel = 0.0f; - TuioPoint p(xpos,ypos,zpos); - path.push_back(p); - - state = TUIO_ADDED; - }; - - virtual ~TuioContainer(){}; + /* + * Modifié par alexandre.bastien@iri.centrepompidou.fr + */ + TuioContainer (TuioContainer *tuioContainer):TuioPoint(tuioContainer) { + this->session_id = tuioContainer->getSessionID(); + this->x_speed = 0.0f; + this->y_speed = 0.0f; + this->motion_speed = 0.0f; + this->motion_accel = 0.0f; + TuioPoint p(xpos,ypos,zpos); + path.push_back(p); + + state = TUIO_ADDED; + }; + + virtual ~TuioContainer(){}; - virtual void update (float xpos, float ypos,float xspeed, float yspeed,float maccel) { - TuioPoint::update(xpos, ypos); - this->x_speed = xspeed; - this->y_speed = yspeed; - this->motion_speed = (float)sqrt(xspeed*xspeed+yspeed*yspeed); - this->motion_accel = maccel; - TuioPoint p(xpos,ypos); - path.push_back(p); - - state = TUIO_UPDATED; - }; + virtual void update (float xpos, float ypos,float xspeed, float yspeed,float maccel) { + TuioPoint::update(xpos, ypos); + this->x_speed = xspeed; + this->y_speed = yspeed; + this->motion_speed = (float)sqrt(xspeed*xspeed+yspeed*yspeed); + this->motion_accel = maccel; + TuioPoint p(xpos,ypos); + path.push_back(p); + + state = TUIO_UPDATED; + }; - /* - * Surchargé par alexandre.bastien@iri.centrepompidou.fr - */ - virtual void update (float xpos, float ypos, float zpos, float xspeed, float yspeed,float maccel) { - TuioPoint::update(xpos, ypos, zpos); - this->x_speed = xspeed; - this->y_speed = yspeed; - this->motion_speed = (float)sqrt(xspeed*xspeed+yspeed*yspeed); - this->motion_accel = maccel; - TuioPoint p(xpos,ypos,zpos); - path.push_back(p); - - state = TUIO_UPDATED; - }; + /* + * Surchargé par alexandre.bastien@iri.centrepompidou.fr + */ + virtual void update (float xpos, float ypos, float zpos, float xspeed, float yspeed,float maccel) { + TuioPoint::update(xpos, ypos, zpos); + this->x_speed = xspeed; + this->y_speed = yspeed; + this->motion_speed = (float)sqrt(xspeed*xspeed+yspeed*yspeed); + this->motion_accel = maccel; + TuioPoint p(xpos,ypos,zpos); + path.push_back(p); + + state = TUIO_UPDATED; + }; - /* - * Modifié par alexandre.bastien@iri.centrepompidou.fr - */ - virtual void update (TuioContainer *tuioContainer) { - TuioPoint::update(tuioContainer); - this->x_speed = tuioContainer->getXSpeed(); - this->y_speed = tuioContainer->getYSpeed(); - this->motion_speed = tuioContainer->getMotionSpeed(); - this->motion_accel = tuioContainer->getMotionAccel(); - TuioPoint p(xpos,ypos,zpos); - path.push_back(p); - - state = TUIO_UPDATED; - }; - - virtual long getSessionID() { return session_id; }; - - /* - * Modifié par alexandre.bastien@iri.centrepompidou.fr - */ - virtual TuioPoint getPosition() { - TuioPoint p(xpos,ypos,zpos); - return p; - }; + /* + * Modifié par alexandre.bastien@iri.centrepompidou.fr + */ + virtual void update (TuioContainer *tuioContainer) { + TuioPoint::update(tuioContainer); + this->x_speed = tuioContainer->getXSpeed(); + this->y_speed = tuioContainer->getYSpeed(); + this->motion_speed = tuioContainer->getMotionSpeed(); + this->motion_accel = tuioContainer->getMotionAccel(); + TuioPoint p(xpos,ypos,zpos); + path.push_back(p); + + state = TUIO_UPDATED; + }; + + virtual long getSessionID() { return session_id; }; + + /* + * Modifié par alexandre.bastien@iri.centrepompidou.fr + */ + virtual TuioPoint getPosition() { + TuioPoint p(xpos,ypos,zpos); + return p; + }; - virtual std::list getPath() { - return path; - }; - - virtual void remove() { - state = TUIO_REMOVED; - timestamp = TUIO_UNDEFINED; - } - - virtual float getXSpeed() { return x_speed; }; - virtual float getYSpeed() { return y_speed; }; - virtual float getMotionSpeed() { return motion_speed; }; - virtual float getMotionAccel() { return motion_accel; }; - - virtual int getState() { return state; }; - virtual void setUpdateTime(long timestamp) { - this->timestamp = timestamp; - TuioPoint *lastPoint = &path.back(); - if (lastPoint!=NULL) lastPoint->setUpdateTime(timestamp); - }; + virtual std::list getPath() { + return path; + }; + + virtual void remove() { + state = TUIO_REMOVED; + timestamp = TUIO_UNDEFINED; + } + + virtual float getXSpeed() { return x_speed; }; + virtual float getYSpeed() { return y_speed; }; + virtual float getMotionSpeed() { return motion_speed; }; + virtual float getMotionAccel() { return motion_accel; }; + + virtual int getState() { return state; }; + virtual void setUpdateTime(long timestamp) { + this->timestamp = timestamp; + TuioPoint *lastPoint = &path.back(); + if (lastPoint!=NULL) lastPoint->setUpdateTime(timestamp); + }; };