VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
parallel/vehicleSim.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1992-2012 VT MAK
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include <vl/exerciseConn.h>
12 #include <vl/reflectedEntityList.h>
13 #include <vl/entityPublisher.h>
15 #include <vl/topoView.h>
17 #include <vl/fireInteraction.h>
18 #include <vl/publisherContainer.h>
19 
21 
24 class DtVehicleSim
25 {
26 public:
27 
30  DtVehicleSim( double refLat, double refLon,
32  const DtEntityIdentifier& id, const DtEntityType& type,
33  const char* name, const char* markings,
34  const DtDeadReckonTypes alg, bool haveArtParts,
35  DtObjectPublisherContainer &pubContainer);
36 
38  virtual ~DtVehicleSim();
39 
41  virtual void init( DtConstVector initPos, double initSpeed,
42  double initHeading, double initTRadius,
43  double initPitch, bool autoRoll, double initRoll );
44 
46  virtual void simulate();
47 
49  virtual void fireMunition( const DtGlobalObjectDesignator& tg );
50  virtual void fireMunition();
51  virtual void detonateMunition();
52  virtual void munitionUpdate();
53 
55  virtual void reactToDetonation();
56  virtual int checkDetonation();
57  virtual void reactToDamage();
58  virtual bool isDestroyed();
59  virtual DtTime timeDestroyed();
60 
62  virtual void toggleEmissions();
63  virtual void enableEmissions();
64  virtual void disableEmissions();
65  virtual void emissionsUpdate();
66 
67 public:
68 
69  // Set the current detonation for reaction.
71 
72  static void setLethalDetonationRange( double range );
73  static void setMunitionFlightTime( DtTime time );
74 
75  // set the delta time for next simTick update
76  static void setSimDeltaTime(DtTime theDt) { myDt = theDt; }
77 
78 protected:
79 
80  // delta time for next simTick update
81  static DtTime myDt;
82 
83  // Current detonation, if any.
85 
86 protected:
87 
88  virtual void moveArtParts();
89 
90 protected:
91 
100 
101  float mySpeed;
102  float myTurnRadius;
103  float myTurnRate;
104  float myScalarAccel;
105  double myBeamTime;
106 
108  DtVector myPos;
109  DtVector32 myVel;
112 
113  float myTurretAz;
114  float myTurretAzRate;
115  float myGunElev;
116  float myGunElevRate;
117 
121  bool myIsDestroyed;
122 
123  bool myHaveArtParts;
124  bool myEmissionsEnabled;
125 
126 protected:
127  static double theLethalDetonationRange;
129 };
130 
131 

Document ID: Generated on Thu Feb 22 04:26:36 EST 2018 from SVN revision 186468
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)