void Mouse::mouseBegan( cinder::app::MouseEvent &event){ if(mTouchManagerPntr){ mTouchManagerPntr->touchesBegan(mTouchId,event.getPos()); } }
void SimpleMultiThreadedSenderApp::mouseMove( cinder::app::MouseEvent event ) { mCurrentMousePositon = event.getPos(); osc::Message msg( "/mousemove/1" ); msg.append( mCurrentMousePositon.x ); msg.append( mCurrentMousePositon.y ); mSender.send( msg ); }
void Warp::mouseDown( cinder::app::MouseEvent &event ) { if( !sIsEditMode ) return; if( mSelected >= mPoints.size() ) return; // calculate offset by converting control point from normalized to standard screen space ivec2 p = ( getControlPoint( mSelected ) * mWindowSize ); mOffset = event.getPos() - p; event.setHandled( true ); }
void Warp::mouseDrag( cinder::app::MouseEvent &event ) { if( !sIsEditMode ) return; if( mSelected >= mPoints.size() ) return; vec2 m( event.getPos() ); vec2 p( m.x - mOffset.x, m.y - mOffset.y ); // set control point in normalized screen space setControlPoint( mSelected, p / mWindowSize ); mIsDirty = true; event.setHandled( true ); }
void Warp::mouseMove( cinder::app::MouseEvent &event ) { float distance; mSelected = findControlPoint( event.getPos(), &distance ); }
void Mouse::MoveEvent(cinder::app::MouseEvent event) { pos = event.getPos(); }