示例#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 );
}
示例#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 );
}
示例#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 );
}
示例#5
0
void Warp::mouseMove( cinder::app::MouseEvent &event )
{
	float distance;

	mSelected = findControlPoint( event.getPos(), &distance );
}
示例#6
0
文件: mouse.cpp 项目: Lacty/FPSShot
void Mouse::MoveEvent(cinder::app::MouseEvent event) {
  pos = event.getPos();
}