void TuioManager::removeUntouchedStoppedCursors() { if (cursorList.size()==0) return; std::list<TuioCursor*>::iterator tuioCursor = cursorList.begin(); while (tuioCursor!=cursorList.end()) { TuioCursor *tcur = (*tuioCursor); if ((tcur->getTuioTime()!=currentFrameTime) && (!tcur->isMoving())) { removeTuioCursor(tcur); tuioCursor = cursorList.begin(); } else tuioCursor++; } }
void TuioManager::stopUntouchedMovingCursors() { std::list<TuioCursor*> untouched; for (std::list<TuioCursor*>::iterator tuioCursor = cursorList.begin(); tuioCursor!=cursorList.end(); tuioCursor++) { TuioCursor *tcur = (*tuioCursor); if ((tcur->getTuioTime()!=currentFrameTime) && (tcur->isMoving())) { tcur->stop(currentFrameTime); updateCursor = true; if (verbose) std::cout << "set cur " << tcur->getCursorID() << " (" << tcur->getSessionID() << ") " << tcur->getX() << " " << tcur->getY() << " " << tcur->getXSpeed() << " " << tcur->getYSpeed()<< " " << tcur->getMotionAccel() << " " << std::endl; } } }
void TuioServer::removeUntouchedStoppedCursors() { for (std::list<TuioCursor*>::iterator tuioCursor = cursorList.begin(); tuioCursor!=cursorList.end(); tuioCursor++) { TuioCursor *tcur = (*tuioCursor); if ((tcur->getTuioTime()!=currentFrameTime) && (!tcur->getTuioState()==TUIO_ADDED) && (!tcur->isMoving())) { removeTuioCursor(tcur); removeUntouchedStoppedCursors(); break; } } }