Changeset 417 for trunk/VUT/work/iv


Ignore:
Timestamp:
11/16/05 11:09:15 (19 years ago)
Author:
mattausch
Message:

added object place mode in demo. quake style movements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/work/iv/IVFrameListener.cpp

    r345 r417  
    258258                return false; 
    259259        } 
    260 /*      if (!processUnbufferedMouseInput(evt)) 
    261         {       return false;   }*/ 
     260        if (!processUnbufferedMouseInput(evt)) 
     261        {        
     262                return false;    
     263        } 
    262264 
    263265        // --- set parameters for visualization 
     
    313315                break; 
    314316        };       
     317 
     318        return true; 
     319} 
     320 
     321bool IVFrameListener::processUnbufferedMouseInput(const FrameEvent& evt) 
     322{ 
     323        /* Rotation factors, may not be used if the second mouse button is pressed. */ 
     324 
     325    /* If the second mouse button is pressed, then the mouse movement results in  
     326       sliding the camera, otherwise we rotate. */ 
     327    if (mInputDevice->getMouseButton(1)) 
     328    { 
     329                mTranslateVector.x += mInputDevice->getMouseRelativeX() * 0.13; 
     330                mTranslateVector.y -= mInputDevice->getMouseRelativeY() * 0.13; 
     331        } 
     332        else 
     333        { 
     334                mRotX = Degree(-mInputDevice->getMouseRelativeX() * 0.13); 
     335                mRotY = Degree(-mInputDevice->getMouseRelativeY() * 0.13); 
     336        } 
     337 
    315338 
    316339        return true; 
Note: See TracChangeset for help on using the changeset viewer.