VR-Vantage 3.1 API Documentation
Home
Modules
Namespaces
Classes
Files
Libraries
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
examples
exampleDriverPlugin
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
12
#include <
vrvCore/DtEntityIndicatorWidget.h
>
13
#include <
vrvCore/DtSelectionManager.h
>
14
#include <
vrvCore/DtEntityInfoWidget.h
>
15
16
#include <
vrvUtil/DtSignalConnectionManager.h
>
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
48
class
DtExampleSimEngine
49
{
50
public
:
51
54
DtExampleSimEngine
(
makVrv::DtDe
& de);
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
85
void
slot_infoLabelsArePinned
(
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
:
114
makVrv::DtDe
&
myDe
;
115
116
makVrv::DtEntity3dFacade
*
myEntityFacade
;
117
makVrv::DtEntityIndicatorWidget
*
myEntityIndicator
;
118
makVrv::DtEntityInfoWidget
*
myEntityInfoWidget
;
119
makVrv::DtEntityHATLineFacade
*
myEntityHATLineFacade
;
120
121
std::string
myEntityDisplayName
;
122
bool
myEntityInfoWidgetPinnedFlag
;
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
143
makVrv::DtSignalConnectionManager
mySignalConnections
;
144
147
makVrv::DtCoordinateSystem
*
myCoordinateSystem
=
nullptr
;
148
149
makVrv::vrvSignalsLib::connection
myMouseEnterConnection
;
150
makVrv::vrvSignalsLib::connection
myMouseLeaveConnection
;
151
};
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (
www.mak.com
)