Exemple #1
0
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();
}
Exemple #2
0
void ComponeApp::touchesEnded(cinder::app::TouchEvent event) {
	_touchesMtx.lock();
	for(auto &touch : event.getTouches()) {
		_touches.erase(touch.getId());
	}
	_touchesMtx.unlock();
}
Exemple #3
0
void ComponeApp::touchesBegan(cinder::app::TouchEvent event) {
	_touchesMtx.lock();
	for(auto &touch : event.getTouches()) {
		auto nt = touch;
		_touches[touch.getId()] = touch;
	}
	_touchesMtx.unlock();
}
Exemple #4
0
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());
        }
    }
}