00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00031 #ifndef USERVEHICLES_H
00032 #define USERVEHICLES_H
00033
00034 #include "FlyLegacy.h"
00035 #include "Cameras.h"
00036 #include "Panels.h"
00037 #include "Subsystems.h"
00038 #include "Utility.h"
00039
00040 #include <string>
00041 #include <vector>
00042 #include <map>
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052 class CSimulatedVehicle : public CStreamObject {
00053 public:
00054 CSimulatedVehicle (const char* svhFilename);
00055
00056 int Read (SStream *stream, Tag tag);
00057 void ReadFinished (void);
00058 void Write (SStream *stream);
00059
00060
00061 protected:
00062 Tag type;
00063 unsigned int mxdt;
00064 char acid[64];
00065 char make[64];
00066 char name[64];
00067 float emas;
00068 SVector mine;
00069 SVector CofG;
00070 float imbl;
00071 float iceR;
00072 float wingarea;
00073 float wingspan;
00074 float meanchord;
00075 float ceiling;
00076 float maxcruisespeed;
00077 float approachspeed;
00078 float vne;
00079 float aoaL;
00080 float stallaoa;
00081 float posG;
00082 float negG;
00083 float stallspeed;
00084 float blst;
00085 float wTrbSpeed;
00086 float wTrbTimK;
00087 float wTrbCeiling;
00088 float wTrbDuration;
00089 float nTrbSpeed;
00090 float nTrbTimK;
00091 float nTrbCeiling;
00092 float nTrbDuration;
00093
00094
00095
00096 Tag sfxdTag;
00097 char sfxdFilename[64];
00098
00099 SMessage mAlt;
00100 SMessage mSpd;
00101 SMessage mVsi;
00102 SMessage mMag;
00103 SMessage mRpm;
00104 };
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114 class CFuelSystem : public CStreamObject {
00115 public:
00116 CFuelSystem (const char* gasFilename);
00117 ~CFuelSystem (void);
00118
00119 int Read (SStream *stream, Tag tag);
00120 void ReadFinished (void);
00121 void Write (SStream *stream);
00122
00123 public:
00124 EAirportFuelTypes grad;
00125 std::vector<CFuelSubsystem*> fsub;
00126 };
00127
00128
00129
00130
00131
00132
00133
00134 class CAirfoil : public CStreamObject {
00135 public:
00136
00137 CAirfoil (void);
00138
00139
00140 int Read (SStream *stream, Tag tag);
00141
00142 protected:
00143 std::string name;
00144 float samn;
00145 float samx;
00146 CDataMap *lift;
00147 CDataMap *drag;
00148 };
00149
00150
00151 class CWingFlap : public CStreamObject {
00152 public:
00153
00154 CWingFlap (void);
00155
00156
00157 int Read (SStream *stream, Tag tag);
00158
00159 protected:
00160 std::string chan;
00161 std::vector<std::string> partVector;
00162 bool nvrt;
00163 CDataMap *lift;
00164 CDataMap *drag;
00165 };
00166
00167
00168 class CWingDamage : public CStreamObject {
00169 public:
00170
00171 CWingDamage (void);
00172
00173
00174 int Read (SStream *stream, Tag tag);
00175
00176 protected:
00177 float perd;
00178 };
00179
00180
00181 class CWingSection : public CStreamObject {
00182 public:
00183
00184 CWingSection (void);
00185
00186
00187 int Read (SStream *stream, Tag tag);
00188
00189 protected:
00190 std::string foil;
00191 float area;
00192 float span;
00193 SVector bPos;
00194 SVector bAng;
00195 bool grnd;
00196 float geff;
00197 float gAGL;
00198 float idcf;
00199 CWingFlap *flap;
00200 CWingDamage *dmge;
00201 float load;
00202 };
00203
00204 class CAerodynamicModel : public CStreamObject {
00205 public:
00206
00207 CAerodynamicModel (const char* wngFilename);
00208
00209
00210 int Read (SStream *stream, Tag tag);
00211
00212 protected:
00213 SVector dofa;
00214
00215 bool grnd;
00216 float geff;
00217 float gAGL;
00218 float cd;
00219 std::map<std::string,CAirfoil*> foilMap;
00220 std::map<std::string,CWingSection*> wingMap;
00221 };
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233 class CElectricalSystem : public CStreamObject {
00234 public:
00235 CElectricalSystem (const char* ampFilename);
00236 ~CElectricalSystem (void);
00237
00238
00239 int Read (SStream *stream, Tag tag);
00240 void ReadFinished (void);
00241 void Write (SStream *stream);
00242
00243
00244 void Timeslice (float dT);
00245 void Print (FILE *f);
00246
00247 public:
00248 std::vector<CSubsystem*> subs;
00249
00250
00251 CAileronControl *pAileron;
00252 CElevatorControl *pElevator;
00253 CRudderControl *pRudder;
00254 CAileronTrimControl *pAileronTrim;
00255 CElevatorTrimControl *pElevatorTrim;
00256 CRudderTrimControl *pRudderTrim;
00257 };
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269 class CPitotStaticSystem : public CStreamObject {
00270 public:
00271 CPitotStaticSystem (const char* pssFilename);
00272 ~CPitotStaticSystem (void);
00273
00274 int Read (SStream *stream, Tag tag);
00275 void ReadFinished (void);
00276 void Write (SStream *stream);
00277
00278 public:
00279 float iceT;
00280 std::vector<CPitotStaticPort*> ports;
00281 };
00282
00283
00284
00285
00286
00287
00288
00289
00290 class CGroundSuspension : public CStreamObject {
00291 public:
00292 CGroundSuspension (const char* whlFilename);
00293
00294 int Read (SStream *stream, Tag tag);
00295 void ReadFinished (void);
00296 void Write (SStream *stream);
00297
00298 public:
00299 };
00300
00301
00302
00303
00304
00305
00306
00307 class CLoadoutUnit : public CStreamObject {
00308 public:
00309 CLoadoutUnit (void);
00310
00311 int Read (SStream *stream, Tag tag);
00312 void ReadFinished (void);
00313 void Write (SStream *stream);
00314
00315 protected:
00316 char name[64];
00317 SVector bPos;
00318 float load;
00319 float hiLm;
00320 char utyp[64];
00321 };
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331 class CVariableLoadouts : public CStreamObject {
00332 public:
00333 CVariableLoadouts (const char* vldFilename);
00334 ~CVariableLoadouts (void);
00335
00336 int Read (SStream *stream, Tag tag);
00337 void ReadFinished (void);
00338 void Write (SStream *stream);
00339
00340 protected:
00341 std::vector<CLoadoutUnit*> unit;
00342 };
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352 class CCockpitManager : public CStreamObject {
00353 public:
00354 CCockpitManager (const char* pitFilename);
00355 ~CCockpitManager (void);
00356
00357
00358 int Read (SStream *stream, Tag tag);
00359 void ReadFinished ();
00360
00361
00362 CPanel* GetCurrentPanel (void);
00363 void SetPanel (Tag tag);
00364 Tag GetPanel (void);
00365 void Draw (void);
00366
00367 protected:
00368 std::map<Tag,CPanel*> ckpt;
00369
00370
00371 CPanel* pPanel;
00372 };
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382 class CCameraManager : public CStreamObject {
00383 public:
00384 CCameraManager (const char* whlFilename);
00385 ~CCameraManager (void);
00386
00387
00388 virtual int Read (SStream *stream, Tag tag);
00389 virtual void ReadFinished (void);
00390
00391
00392 virtual void UpdateCamera (SPosition *targetPosition,
00393 SVector *targetOrientation,
00394 SPosition *eyePosition,
00395 SVector *eyeOrientation,
00396 const float dT);
00397 virtual CCamera* GetActiveCamera (void);
00398 virtual void SelectCamera (Tag id);
00399 virtual void NextCamera (void);
00400 virtual void PrevCamera (void);
00401 virtual void Print (FILE *f);
00402
00403 private:
00404 void ActivateCamera (void);
00405
00406 protected:
00407 std::vector<CCamera*> came;
00408 std::vector<CCamera*>::iterator iActive;
00409 Tag defaultCamera;
00410
00411
00412 SPosition eyePos, tgtPos;
00413 SVector eyeOrient, tgtOrient;
00414 sgVec4 ssgCameraEye;
00415 };
00416
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441 class CLevelOfDetail : public CStreamObject {
00442 public:
00443
00444 CLevelOfDetail (const char* lodFilename);
00445 ~CLevelOfDetail (void);
00446
00447
00448 int Read (SStream *stream, Tag tag);
00449
00450
00451 ssgEntity *GetSSGEntity (void);
00452
00453 public:
00454 ssgRoot *root;
00455 ssgSelector *daynight;
00456 ssgSelector *day;
00457 ssgSelector *night;
00458
00459 std::vector<CModelACM*> modelAcm;
00460 CModelACM *shadowAcm;
00461 };
00462
00463
00464
00465
00466
00467 class CRadioManager : public CStreamObject {
00468 public:
00469 CRadioManager (const char* rdoFilename);
00470
00471 int Read (SStream *stream, Tag tag);
00472
00473
00474
00475 public:
00476 };
00477
00478
00479
00480
00481
00482 class CExternalLights : public CStreamObject {
00483 public:
00484 CExternalLights (const char* eltFilename);
00485
00486 int Read (SStream *stream, Tag tag);
00487 void ReadFinished (void);
00488 void Write (SStream *stream);
00489
00490 public:
00491 };
00492
00493
00494
00495
00496
00497 class CEngineManager : public CStreamObject {
00498 public:
00499 CEngineManager (const char* eltFilename);
00500
00501 int Read (SStream *stream, Tag tag);
00502 void ReadFinished (void);
00503 void Write (SStream *stream);
00504
00505 public:
00506 };
00507
00508
00509
00510
00511
00512 class CControlMixer : public CStreamObject {
00513 public:
00514 CControlMixer (const char* mixFilename);
00515
00516 int Read (SStream *stream, Tag tag);
00517 void ReadFinished (void);
00518 void Write (SStream *stream);
00519
00520 public:
00521 };
00522
00523
00524
00525
00526
00527 class CChecklists : public CStreamObject {
00528 public:
00529 CChecklists (const char* eltFilename);
00530
00531 int Read (SStream *stream, Tag tag);
00532 void ReadFinished (void);
00533 void Write (SStream *stream);
00534
00535 public:
00536 };
00537
00538
00539
00540
00541
00542
00543
00544
00545 class CFlightControlSystem : public CStreamObject {
00546 public:
00547 CFlightControlSystem (const char* fcsFilename);
00548
00549 int Read (SStream *stream, Tag tag);
00550 void ReadFinished (void);
00551 void Write (SStream *stream);
00552
00553 public:
00554 };
00555
00556
00557
00558
00559
00560 class CSlopeWindData : public CStreamObject {
00561 public:
00562 CSlopeWindData (const char* swdFilename);
00563
00564 int Read (SStream *stream, Tag tag);
00565 void ReadFinished (void);
00566 void Write (SStream *stream);
00567
00568 public:
00569 };
00570
00571
00572
00573
00574
00575
00576
00577 class CHelicopter : CStreamObject {
00578 public:
00579 CHelicopter (const char* nfoFilename);
00580
00581 int Read (SStream *stream, Tag tag);
00582 void ReadFinished (void);
00583 void Write (SStream *stream);
00584
00585 protected:
00586 char make[64];
00587
00588 char iconFilename[64];
00589 int classification;
00590 int usage;
00591 char svhFilename[64];
00592 char gasFilename[64];
00593 char wngFilename[64];
00594 char ampFilename[64];
00595 char pssFilename[64];
00596 char whlFilename[64];
00597 char vldFilename[64];
00598 char pitFilename[64];
00599 char camFilename[64];
00600 char lodFilename[64];
00601 char rdoFilename[64];
00602 char eltFilename[64];
00603 char engFilename[64];
00604 char rtrFilename[64];
00605 char mixFilename[64];
00606 char cklFilename[64];
00607 char fcsFilename[64];
00608 char swdFilename[64];
00609 char sitFilename[64];
00610 };
00611
00612 #endif // USERVEHICLES_H