VR-Vantage 3.2 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
exampleSimEngine.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2023 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
15 
17 #include <vrvUtil/DtUnicode.h>
18 #include <vrvUtil/signalslib.h>
19 
20 #include <matrix/vlTaitBryan.h>
21 #include <matrix/vlVector.h>
22 
23 #include <string>
24 
25 //#define SIM_IS_SHIP
26 
27 namespace makVrv
28 {
29  class DtEntity3dFacade;
30  class DtEntityHATLineFacade;
31  class DtDe;
32  class DtCoordinateSystem;
33 }
34 
49 {
50 public:
51 
55 
57  virtual ~DtExampleSimEngine();
58 
62  bool init();
63 
66  bool uninit();
67 
71  bool tick(double simTime);
72 
73 protected:
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
86  const makVrv::DtSelectionManager::IdSet& pinOrUnpinList,
87  bool pinAllLabels);
88 
91  virtual void setHoverSignalsActive(bool active);
92 
94  virtual void setEntityInfoWidgetActive(bool active);
95 
97  virtual makVrv::DtUnicode generateInfoString() const;
98 
100  virtual void updatePosition(double simTime);
101 
102 #ifdef SIM_IS_SHIP
103  // For the ship, need to pass dT so we can determine velocity
104  virtual void repositionShip(DtVector position, DtTaitBryan ori, double dT);
105 #else
106 
107  virtual void repositionAircraft(DtVector position, DtTaitBryan ori);
108 #endif
109 
111  virtual void slot_coordinateSystemChanged();
112 
113 protected:
115 
120 
121  std::string myEntityDisplayName;
123 
124  DtTaitBryan myOrientation;
125  DtVector myPosition;
126 
127 #ifdef SIM_IS_SHIP
128  // For the ship, need our last (local) position to determine our velocity
129  DtVector myLastPosition;
130 #endif
131  double myHeading;
132 
133  double myLastCommLineTime;
134  double myLastUpdateTime;
135 
136  DtVector myOrbitCenter;
137  double myAngularVelocity;
138  double myClockAngle;
139  double myRadius;
140  double myRoll;
141 
142 
144 
148 
149  makVrv::vrvSignalsLib::connection myMouseEnterConnection;
150  makVrv::vrvSignalsLib::connection myMouseLeaveConnection;
151 };


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