VR-Vantage 2.7 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
exampleSimEngine.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2019 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
15 
17 #include <vrvUtil/DtUnicode.h>
18 
19 #include <matrix/vlTaitBryan.h>
20 #include <matrix/vlVector.h>
21 
22 #include <string>
23 
24 //#define SIM_IS_SHIP
25 
26 namespace makVrv
27 {
28  class DtEntity3dFacade;
29  class DtEntityHATLineFacade;
30  class DtDe;
31 
32 }
33 
48 {
49 public:
50 
54 
56  virtual ~DtExampleSimEngine();
57 
61  bool init();
62 
65  bool uninit();
66 
70  bool tick(double simTime);
71 
72 protected:
74 
75 
76 
77 
78 
79 
82 
83 
86  virtual void setHoverSignalsActive(bool active);
87 
89  virtual void setEntityInfoWidgetActive(bool active);
90 
92  virtual makVrv::DtUnicode generateInfoString() const;
93 
95  virtual void updatePosition(double simTime);
96 
97 #ifdef SIM_IS_SHIP
98  // For the ship, need to pass dT so we can determine velocity
99  virtual void repositionShip(DtVector position, DtTaitBryan ori, double dT);
100 #else
101 
102  virtual void repositionAircraft(DtVector position, DtTaitBryan ori);
103 #endif
104 
105 protected:
107 
112 
115 
116  DtTaitBryan myOrientation;
117  DtVector myPosition;
118 
119 #ifdef SIM_IS_SHIP
120  // For the ship, need our last (local) position to determine our velocity
121  DtVector myLastPosition;
122 #endif
123  double myHeading;
124 
125  double myLastCommLineTime;
126  double myLastUpdateTime;
127 
128  DtVector myOrbitCenter;
129  double myAngularVelocity;
130  double myClockAngle;
131  double myRadius;
132  double myRoll;
133 
134 
136 };


Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)