VR-Vantage 2.6 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:
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  virtual void repositionAircraft(DtVector position, DtTaitBryan ori);
103 #endif
104 
105 protected:
107 
112 
113  std::string myEntityDisplayName;
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 };
double myLastUpdateTime
Definition: exampleDriver/DtExampleSimEngine.h:126
DtVector myOrbitCenter
Definition: exampleDriver/DtExampleSimEngine.h:128
A unicode string.
Definition: DtUnicode.h:33
double myLastCommLineTime
Definition: exampleDriver/DtExampleSimEngine.h:125
Contains makVrv::DtEntityIndicatorWidget class.
virtual ~DtExampleSimEngine()
DTOR.
virtual void setEntityInfoWidgetActive(bool active)
Sets whether the entity info widget is displayed or not.
Contains makVrv:DtSelectionManager class.
DtVector myPosition
Definition: exampleDriver/DtExampleSimEngine.h:117
bool myEntityInfoWidgetPinnedFlag
Definition: exampleDriver/DtExampleSimEngine.h:114
virtual void updatePosition(double simTime)
Updates the current position / orientation of the entity.
bool uninit()
Destroy what was created in init()
bool init()
Initialize the simulation engine.
bool tick(double simTime)
Perform updates param[in] simTime is he current simulation time.
Class for height above terrain line to show height above terrain line and label.
Definition: DtEntityHATLineFacade.h:32
DtTaitBryan myOrientation
Definition: exampleDriver/DtExampleSimEngine.h:116
DtEntityInfoWidget is the object proxy for 2D distributed entity info (label) objects.
Definition: DtEntityInfoWidget.h:30
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:24
double myClockAngle
Definition: exampleDriver/DtExampleSimEngine.h:130
The DtEntity3dFacade is a facade around agents that make up an entity in the 3D model set...
Definition: DtEntity3dFacade.h:39
double myHeading
Definition: exampleDriver/DtExampleSimEngine.h:123
The indicator widget.
Definition: DtEntityIndicatorWidget.h:31
void slot_toggleLabelPinnedState(const makVrv::DtSelectionManager::IdSet &selList)
Boost slots.
Contains makVrv::DtEntityInfoWidget class.
double myRadius
Definition: exampleDriver/DtExampleSimEngine.h:131
Base class to provide boost signal/slot management.
virtual void repositionAircraft(DtVector position, DtTaitBryan ori)
Positions the aircraft at the given position with the given orientation.
DtExampleSimEngine(makVrv::DtDe &de)
CTOR.
makVrv::DtDe & myDe
Definition: exampleDriver/DtExampleSimEngine.h:106
makVrv::DtEntity3dFacade * myEntityFacade
Definition: exampleDriver/DtExampleSimEngine.h:108
makVrv::DtEntityIndicatorWidget * myEntityIndicator
Definition: exampleDriver/DtExampleSimEngine.h:109
virtual void setHoverSignalsActive(bool active)
Sets whether the sim engine is listening for mouseover events or not in its entity indicator...
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
double myRoll
Definition: exampleDriver/DtExampleSimEngine.h:132
makVrv::DtEntityHATLineFacade * myEntityHATLineFacade
Definition: exampleDriver/DtExampleSimEngine.h:111
std::string myEntityDisplayName
Definition: exampleDriver/DtExampleSimEngine.h:113
std::set< DtUniqueID > IdSet
Definition: DtSelectionManager.h:32
double myAngularVelocity
Definition: exampleDriver/DtExampleSimEngine.h:129
makVrv::DtEntityInfoWidget * myEntityInfoWidget
Definition: exampleDriver/DtExampleSimEngine.h:110
virtual makVrv::DtUnicode generateInfoString() const
Generates the information string displayed in the entity info widget.
Provide a basic sim engine to use in an example showing how to embed a sim engine into a driver that ...
Definition: exampleDriver/DtExampleSimEngine.h:47
makVrv::DtSignalConnectionManager mySignalConnections
Definition: exampleDriver/DtExampleSimEngine.h:135


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