Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1879 in orxonox.OLD for orxonox/trunk/core/player.cc


Ignore:
Timestamp:
May 8, 2004, 1:12:33 PM (21 years ago)
Author:
patrick
Message:

orxonox/trunk: perspective view, key-repeat bug fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/core/player.cc

    r1875 r1879  
    3232
    3333
    34 void Player::setPosition( int x, int y, int z)
     34void Player::setPosition( float x, float y, float z)
    3535{
    3636  xCor = x; yCor = y; zCor = z;
    3737}
    3838
    39 void Player::getPosition(int* x, int* y, int* z)
     39void Player::getPosition(float* x, float* y, float* z)
    4040{
    4141  *x = xCor; *y = yCor; *z = zCor;
    4242}
    4343
    44 void Player::goX(int x)
     44void Player::goX(float x)
    4545{
    4646  xCor += x;
     
    4848
    4949
    50 void Player::goY(int y)
     50void Player::goY(float y)
    5151{
    5252  yCor += y;
    5353}
    5454
    55 void Player::goZ(int z)
     55void Player::goZ(float z)
    5656{
    5757  zCor += z;
     
    6868{
    6969  //cout << "Player::drawPlayer()" << endl;
    70   glColor3f(1.0, 0.9, 0.4);
    71   glRectf(-5.0 + yCor, -5.0 + xCor, 5.0 + yCor, 5.0 + xCor);
     70  //glColor3f(0.0, 0.9, 0.7);
     71  //glRectf(-0.5 + yCor, -0.5 + xCor, 0.5 + yCor, 2.0 + xCor);
     72
     73  glPushMatrix();
     74  glScalef(1.0, 3.0, 1.0);
     75  glTranslatef(xCor, yCor, 3.0);
     76  glutWireCube(1.0);
     77  glPopMatrix();
     78
     79
    7280  cout << "x: " << xCor << " y: " << yCor << endl;
    7381}
Note: See TracChangeset for help on using the changeset viewer.