Exemplo n.º 1
0
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 );
}
Exemplo n.º 3
0
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 );
}
Exemplo n.º 4
0
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 );
}
Exemplo n.º 5
0
void Warp::mouseMove( cinder::app::MouseEvent &event )
{
	float distance;

	mSelected = findControlPoint( event.getPos(), &distance );
}
Exemplo n.º 6
0
void Mouse::MoveEvent(cinder::app::MouseEvent event) {
  pos = event.getPos();
}