VR-Link API Documentation for DIS
 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  DtTime timeSpacing);
37 
39  virtual ~DtVehicleSim();
40 
42  virtual void init( DtConstVector initPos, double initSpeed,
43  double initHeading, double initTRadius,
44  double initPitch, bool autoRoll, double initRoll, int num );
45 
47  virtual void simulate();
48 
50  virtual void fireMunition( const DtGlobalObjectDesignator& tg );
51  virtual void fireMunition();
52  virtual void detonateMunition();
53  virtual void munitionUpdate();
54 
56  virtual void reactToDetonation();
57  virtual int checkDetonation();
58  virtual void reactToDamage();
59  virtual bool isDestroyed();
60  virtual DtTime timeDestroyed();
61 
63  virtual void toggleEmissions();
64  virtual void enableEmissions();
65  virtual void disableEmissions();
66  virtual void emissionsUpdate();
67 
68 public:
69 
70  // Set the current detonation for reaction.
72 
73  static void setLethalDetonationRange( double range );
74  static void setMunitionFlightTime( DtTime time );
75 
76  // set the delta time for next simTick update
77  static void setSimDeltaTime(DtTime theDt) { myDt = theDt; }
78 
79 protected:
80 
81  // delta time for next simTick update
82  static DtTime myDt;
83 
84  // Current detonation, if any.
86 
87 protected:
88 
89  virtual void moveArtParts();
90 
91 protected:
92 
101 
102  float mySpeed;
103  float myTurnRadius;
104  float myTurnRate;
105  float myScalarAccel;
106  double myBeamTime;
107 
109  DtVector myPos;
110  DtVector32 myVel;
113 
114  float myTurretAz;
115  float myTurretAzRate;
116  float myGunElev;
117  float myGunElevRate;
118 
122  bool myIsDestroyed;
123 
124  bool myHaveArtParts;
125  bool myEmissionsEnabled;
126 
128 
129 protected:
130  static double theLethalDetonationRange;
132 };
133 
134 

Document ID: Generated on Mon Jun 22 21:18:40 EDT 2020 from SVN revision 213785
Copyright © 2005-2018 MAK Technologies. All Rights Reserved (www.mak.com)