Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/player.h @ 2779

Last change on this file since 2779 was 2730, checked in by bensch, 20 years ago

orxonox/trunk: implemented a glList for player:

this is for testing purposes only, and will be set correctly, as soon as the Phyisics engine is up and running.
3 things have been done:


  1. added GLuint objectList to the player class.
  2. moved the mesh-definition of the player-object to the Player::Player, and packed into a list which resides to objectList.
  3. glCallList added into Player::Draw()

Patrick: i hope you don't mind this slight change in the trunk

File size: 885 bytes
RevLine 
[2190]1/*!
2    \file player.h
3    \brief Implements a basic controllable WorldEntity
4*/
[1853]5
6#ifndef PLAYER_H
7#define PLAYER_H
8
[2036]9#include "world_entity.h"
[1853]10
[2190]11//! Basic controllable WorldEntity
[2036]12class Player : public WorldEntity
13{
[2551]14  friend class World;
15 
[1853]16 public:
[2190]17  Player (bool isFree = false);
[1853]18  ~Player ();
[2551]19 
20  virtual void post_spawn ();
[2190]21  virtual void tick (float time);
22  virtual void hit (WorldEntity* weapon, Vector loc);
23  virtual void destroy ();
24  virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
[2551]25  virtual void command (Command* cmd);
[1900]26 
[2190]27  virtual void draw ();
28  virtual void get_lookat (Location* locbuf);
[2551]29 
30  virtual void left_world ();
31 
[1856]32 private:
[2551]33  bool bUp, bDown, bLeft, bRight, bAscend, bDescend;
34  bool bFire;
35  Vector velocity;
36  float travel_speed;
37  float acceleration;
[2730]38  GLuint objectList;
[2551]39 
40  void move (float time);
41 
[1853]42};
43
44#endif
Note: See TracBrowser for help on using the repository browser.