Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2938 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
Nov 21, 2004, 1:34:16 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk/importer: smoothZoom

Location:
orxonox/trunk/importer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/importer/framework.cc

    r2936 r2938  
    55void DrawGLScene()
    66{
     7  if (dist > zoomTo +.1)
     8    dist -= .1;
     9  else if (dist < zoomTo -.1)
     10    dist += .1;
    711  rotatorP += rotatorV;
    812 
     
    6569  rotatorV = .0;
    6670  dist = 5.0;
     71  zoomTo = dist;
    6772  // Build the font from a TGA image font.tga in the data directory
    6873  // Hide the mouse cursor
     
    8893          {
    8994            printf("MouseWheel up\n");
    90             dist *= .5;
     95            zoomTo *= .5;
    9196          }
    9297        else if (event.button.button == 5)
    9398          {
    9499            printf("MouseWheel down\n");
    95             dist *= 2;
     100            zoomTo *= 2;
    96101          }
    97102        else
  • orxonox/trunk/importer/framework.h

    r2933 r2938  
    99float rotatorV;
    1010float dist;
     11float zoomTo;
    1112
    1213WindowHandler wHandler;  // Create an instance of the whandler basecode class
Note: See TracChangeset for help on using the changeset viewer.