Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/parenting/src/world.h @ 3335

Last change on this file since 3335 was 3335, checked in by bensch, 19 years ago

orxonox/branches/parenting: added TrackManager to world.cc. (just the constructor), and moved some functions.

File size: 2.0 KB
Line 
1/*!
2    \file world.h
3    \brief Holds and manages all game data
4*/ 
5
6#ifndef _WORLD_H
7#define _WORLD_H
8
9#include "stdincl.h"
10#include "story_entity.h"
11
12
13class TrackManager;
14class Track;
15class WorldEntity;
16class Camera;
17class PNode;
18
19//! The game environment
20class World : public StoryEntity {
21
22 public:
23  World (char* name);
24  World (int worldID);
25  virtual ~World ();
26
27  template<typename T> 
28    T* spawn (Location* loc, WorldEntity* owner);       // template to be able to spawn any derivation of WorldEntity
29  template<typename T> 
30    T* spawn (Placement* plc, WorldEntity* owner);
31 
32  virtual ErrorMessage init ();
33  virtual ErrorMessage start ();
34  virtual ErrorMessage stop ();
35  virtual ErrorMessage pause ();
36  virtual ErrorMessage resume ();
37
38  virtual void load ();
39  virtual void destroy ();
40
41  //static void vertexCallback (GLfloat* vertex);
42
43  void timeSlice (Uint32 deltaT);
44  void collide ();
45  void draw ();
46  void update ();       // maps Locations to Placements
47  void calcCameraPos (Location* loc, Placement* plc);
48       
49  void unload ();
50  bool command (Command* cmd);
51 
52  void setTrackLen (Uint32 tracklen);
53  int getTrackLen ();
54  //bool system_command (Command* cmd);
55  Camera* getCamera ();
56
57  void spawn (WorldEntity* entity);
58  void spawn (WorldEntity* entity, Vector* absCoor, Quaternion* absDir);
59
60  tList<WorldEntity>* entities;
61 
62  // base level data
63  TrackManager* trackManager;
64  Track* track;
65  Uint32 tracklen;   // number of Tracks the World consist of
66  Vector* pathnodes;
67  Camera* localCamera; 
68
69
70  UPointCurve* testCurve;
71 private:
72  Uint32 lastFrame; //!> last time of frame
73  bool bQuitOrxonox; //!> quit this application
74  bool bQuitCurrentGame; //!> quit only the current game and return to menu
75  bool bPause;
76
77  char* worldName;
78  int debugWorldNr;
79  GLuint objectList;
80
81  WorldEntity* localPlayer;
82 
83  PNode* nullParent;
84 
85  void mainLoop ();
86  void synchronize ();
87  void handleInput ();
88  void timeSlice ();
89  void collision ();
90  void display ();
91  void debug ();
92};
93
94#endif /* _WORLD_H */
Note: See TracBrowser for help on using the repository browser.