00001 /* 00002 * Situation.h 00003 * 00004 * Part of Fly! Legacy project 00005 * 00006 * Copyright 2003 Chris Wallace 00007 * 00008 * Fly! Legacy is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * Fly! Legacy is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with Fly! Legacy; if not, write to the Free Software 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00021 * 00022 */ 00023 00032 #ifndef SITUATION_H 00033 #define SITUATION_H 00034 00035 00036 #include <plib/pu.h> 00037 00038 #include "FlyLegacy.h" 00039 #include "UserVehicles.h" 00040 #include "WorldObjects.h" 00041 #include "Terrain.h" 00042 #include "Sky.h" 00043 // #include "TimeManager.h" 00044 #include "Cameras.h" 00045 #include <vector> 00046 00047 00048 class CSlewManager { 00049 public: 00050 // Constructor 00051 CSlewManager (void); 00052 00053 // CSlewManager methods 00054 void Enable (void); 00055 void Disable (void); 00056 bool IsEnabled (void); 00057 float GetNorthRate (void); 00058 float GetEastRate (void); 00059 float GetAltRate (void); 00060 void SetNorthRate (float rate); 00061 void SetEastRate (float rate); 00062 void SetAltRate (float rate); 00063 void ZeroRate (void); 00064 void Update (float dT); 00065 00066 protected: 00067 bool enabled; 00068 float nRate; // North slew rate, in arcsec/sec 00069 float eRate; // East slew rate, in arcsec/sec 00070 float aRate; // Altitude rate in feet/sec 00071 }; 00072 00073 00074 class CSituation : public CStreamObject { 00075 // Methods 00076 public: 00077 CSituation (const char* sitFilename); 00078 ~CSituation (); 00079 00080 // CStreamObject methods 00081 virtual int Read (SStream *stream, Tag tag); 00082 virtual void ReadFinished (void); 00083 00084 // CSituation methods 00085 CCamera* GetCurrentCamera (void); 00086 CPanel* GetCurrentPanel (void); 00087 CVehicleObject* GetUserVehicle (void); 00088 EFlyObjectType GetUserVehicleType (void); 00089 00090 void PrintUserVehicle (FILE *f); 00091 00092 void Prepare (void); 00093 void Timeslice (float dT); 00094 void Draw (float dT); 00095 00096 public: 00097 CVehicleObject *user; // Reference to user vehicle object 00098 EFlyObjectType userType; // Type of user object 00099 CCameraManager *cmgr; 00100 CCockpitManager *kmgr; 00101 00102 ssgRoot *rootModels; // SSG root for models (non user vehicle) 00103 ssgRoot *rootUserVehicle; // SSG root for user vehicle models 00104 00105 std::vector<CWorldObjectBase*> wobjList; // List of objects in sim situation 00106 00107 int sfx_source_panel; 00108 }; 00109 00110 #endif // SITUATION_H
|
|
Documentation generated by
|