void ComponeApp::touchesMoved(cinder::app::TouchEvent event) { _pan += vec2(-1,1)*(event.getTouches()[0].getPos() - event.getTouches()[0].getPrevPos()); _touchesMtx.lock(); for(auto &touch : event.getTouches()) { _touches[touch.getId()] = touch; } _touchesMtx.unlock(); }
void ComponeApp::touchesEnded(cinder::app::TouchEvent event) { _touchesMtx.lock(); for(auto &touch : event.getTouches()) { _touches.erase(touch.getId()); } _touchesMtx.unlock(); }
void ComponeApp::touchesBegan(cinder::app::TouchEvent event) { _touchesMtx.lock(); for(auto &touch : event.getTouches()) { auto nt = touch; _touches[touch.getId()] = touch; } _touchesMtx.unlock(); }
void Tuio::tuioTouchesMoved(cinder::app::TouchEvent event) { //console()<<"TUIO touches MOVED"<<endl; if(mTouchManagerPntr) { for(TouchEvent::Touch touch :event.getTouches() ) { mTouchManagerPntr->touchesMoved(touch.getId(),touch.getPos()); } } }