Beispiel #1
0
void EnhanceApp::mouseUp( MouseEvent event )
{
    if( mCtlDown )
    {
        int frame = int ( event.getPos().x / float(getWindowWidth()) * mMovie.getNumFrames() );

        mMovie.seekToFrame(  frame );
        mCtlDown = false;
        
    } else
    if( mAltLockDown)
    {
        mScale += mScaleOffset;
        mRot   +=   mRotOffset;
        mScaleOffset = mRotOffset = 0;
        mAltLockDown = false;
    } else
    {
        mAxisDisplay += mAxisOffset;
        mAxisOffset = Vec2f::zero();
    }
    



}
Beispiel #2
0
void EnhanceApp::mouseDrag( MouseEvent event )
{
    //Vec2f offset =  event.getPos() - mClickDown;
    
    Vec2f offset = ( mClickDown - event.getPos()) * .5;
    if( mCtlDown )
    {
        int frame = int ( event.getPos().x / float(getWindowWidth()) * mMovie.getNumFrames() );

        mMovie.seekToFrame(  frame );

    } else
    if( mAltLockDown)
    {
        mScaleOffset = offset.y / getWindowHeight();
        mRotOffset = offset.x;
    } else
    {
        mAxisOffset = offset;
    }
}