Changeset 1879 in orxonox.OLD for orxonox/trunk/core/player.cc
- Timestamp:
- May 8, 2004, 1:12:33 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/core/player.cc
r1875 r1879 32 32 33 33 34 void Player::setPosition( int x, int y, int z)34 void Player::setPosition( float x, float y, float z) 35 35 { 36 36 xCor = x; yCor = y; zCor = z; 37 37 } 38 38 39 void Player::getPosition( int* x, int* y, int* z)39 void Player::getPosition(float* x, float* y, float* z) 40 40 { 41 41 *x = xCor; *y = yCor; *z = zCor; 42 42 } 43 43 44 void Player::goX( int x)44 void Player::goX(float x) 45 45 { 46 46 xCor += x; … … 48 48 49 49 50 void Player::goY( int y)50 void Player::goY(float y) 51 51 { 52 52 yCor += y; 53 53 } 54 54 55 void Player::goZ( int z)55 void Player::goZ(float z) 56 56 { 57 57 zCor += z; … … 68 68 { 69 69 //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 72 80 cout << "x: " << xCor << " y: " << yCor << endl; 73 81 }
Note: See TracChangeset
for help on using the changeset viewer.