VR-Forces 5.0.1 Developer's Guide
 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) 2021 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  class DtCoordinateSystem;
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:
85  const makVrv::DtSelectionManager::IdSet& pinOrUnpinList,
86  bool pinAllLabels);
87 
90  virtual void setHoverSignalsActive(bool active);
91 
93  virtual void setEntityInfoWidgetActive(bool active);
94 
96  virtual makVrv::DtUnicode generateInfoString() const;
97 
99  virtual void updatePosition(double simTime);
100 
101 #ifdef SIM_IS_SHIP
102  // For the ship, need to pass dT so we can determine velocity
103  virtual void repositionShip(DtVector position, DtTaitBryan ori, double dT);
104 #else
105  virtual void repositionAircraft(DtVector position, DtTaitBryan ori);
107 #endif
108 
110  virtual void slot_coordinateSystemChanged();
111 
112 protected:
114 
119 
120  std::string myEntityDisplayName;
122 
123  DtTaitBryan myOrientation;
125 
126 #ifdef SIM_IS_SHIP
127  // For the ship, need our last (local) position to determine our velocity
128  DtVector myLastPosition;
129 #endif
130  double myHeading;
131 
132  double myLastCommLineTime;
133  double myLastUpdateTime;
134 
136  double myAngularVelocity;
137  double myClockAngle;
138  double myRadius;
139  double myRoll;
140 
141 
143 
147 };
double myLastUpdateTime
local clone of the system wide coordinate system. for thread safety.
Definition: DtExampleSimEngine.h:135
DtVector myOrbitCenter
local clone of the system wide coordinate system. for thread safety.
Definition: DtExampleSimEngine.h:137
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
double myLastCommLineTime
local clone of the system wide coordinate system. for thread safety.
Definition: DtExampleSimEngine.h:134
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
local clone of the system wide coordinate system. for thread safety.
Definition: DtExampleSimEngine.h:126
bool myEntityInfoWidgetPinnedFlag
local clone of the system wide coordinate system. for thread safety.
Definition: DtExampleSimEngine.h:123
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. In this case, the entity facade, indicators, and hat line are creat...
bool tick(double simTime)
Perform updates param[in] simTime is he current simulation time.
void slot_infoLabelsArePinned(const makVrv::DtSelectionManager::IdSet &pinOrUnpinList, bool pinAllLabels)
Boost slots.
Class for height above terrain line to show height above terrain line and label.
Definition: DtEntityHATLineFacade.h:32
makVrv::DtCoordinateSystem * myCoordinateSystem
local clone of the system wide coordinate system. for thread safety.
Definition: DtExampleSimEngine.h:147
virtual void slot_coordinateSystemChanged()
slot for when the coordinate system changes
DtTaitBryan myOrientation
local clone of the system wide coordinate system. for thread safety.
Definition: DtExampleSimEngine.h:125
DtEntityInfoWidget is the object proxy for 2D distributed entity info (label) objects.
Definition: DtEntityInfoWidget.h:27
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
double myClockAngle
local clone of the system wide coordinate system. for thread safety.
Definition: DtExampleSimEngine.h:139
The DtEntity3dFacade is a facade around agents that make up an entity in the 3D model set...
Definition: DtEntity3dFacade.h:39
double myHeading
local clone of the system wide coordinate system. for thread safety.
Definition: DtExampleSimEngine.h:132
The DtCoordinateSystem is used to manage the current coordinate system of the scene.
Definition: DtCoordinateSystem.h:41
The indicator widget.
Definition: DtEntityIndicatorWidget.h:29
Contains makVrv::DtEntityInfoWidget class.
double myRadius
local clone of the system wide coordinate system. for thread safety.
Definition: DtExampleSimEngine.h:140
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
local clone of the system wide coordinate system. for thread safety.
Definition: DtExampleSimEngine.h:115
makVrv::DtEntity3dFacade * myEntityFacade
local clone of the system wide coordinate system. for thread safety.
Definition: DtExampleSimEngine.h:117
makVrv::DtEntityIndicatorWidget * myEntityIndicator
local clone of the system wide coordinate system. for thread safety.
Definition: DtExampleSimEngine.h:118
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. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
double myRoll
local clone of the system wide coordinate system. for thread safety.
Definition: DtExampleSimEngine.h:141
makVrv::DtEntityHATLineFacade * myEntityHATLineFacade
local clone of the system wide coordinate system. for thread safety.
Definition: DtExampleSimEngine.h:120
std::string myEntityDisplayName
local clone of the system wide coordinate system. for thread safety.
Definition: DtExampleSimEngine.h:122
std::set< DtUniqueID > IdSet
Definition: DtSelectionManager.h:32
double myAngularVelocity
local clone of the system wide coordinate system. for thread safety.
Definition: DtExampleSimEngine.h:138
makVrv::DtEntityInfoWidget * myEntityInfoWidget
local clone of the system wide coordinate system. for thread safety.
Definition: DtExampleSimEngine.h:119
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: DtExampleSimEngine.h:47
makVrv::DtSignalConnectionManager mySignalConnections
local clone of the system wide coordinate system. for thread safety.
Definition: exampleSimEngine.h:142

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)