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