VR-Link API Documentation for DIS
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
examples
parallel
parallel/vehicleSim.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 1992-2012 VT MAK
3
** All rights reserved.
4
*******************************************************************************/
5
8
9
#pragma once
10
11
#include <
vl/exerciseConn.h
>
12
#include <
vl/reflectedEntityList.h
>
13
#include <
vl/entityPublisher.h
>
14
#include <
vl/emitterSystemPublisher.h
>
15
#include <
vl/topoView.h
>
16
#include <
vl/detonationInteraction.h
>
17
#include <
vl/fireInteraction.h
>
18
#include <
vl/publisherContainer.h
>
19
20
class
DtEmitterBeamRepository
;
21
24
class
DtVehicleSim
25
{
26
public
:
27
30
DtVehicleSim
(
double
refLat,
double
refLon,
31
DtExerciseConn
* conn,
DtReflectedEntityList
* rel,
32
const
DtEntityIdentifier
&
id
,
const
DtEntityType
& type,
33
const
char
* name,
const
char
* markings,
34
const
DtDeadReckonTypes
alg,
bool
haveArtParts,
35
DtObjectPublisherContainer
&pubContainer,
36
DtTime
timeSpacing);
37
39
virtual
~DtVehicleSim
();
40
42
virtual
void
init
(
DtConstVector
initPos,
double
initSpeed,
43
double
initHeading,
double
initTRadius,
44
double
initPitch,
bool
autoRoll,
double
initRoll,
int
num );
45
47
virtual
void
simulate
();
48
50
virtual
void
fireMunition
(
const
DtGlobalObjectDesignator
& tg );
51
virtual
void
fireMunition
();
52
virtual
void
detonateMunition
();
53
virtual
void
munitionUpdate
();
54
56
virtual
void
reactToDetonation
();
57
virtual
int
checkDetonation
();
58
virtual
void
reactToDamage
();
59
virtual
bool
isDestroyed
();
60
virtual
DtTime
timeDestroyed
();
61
63
virtual
void
toggleEmissions
();
64
virtual
void
enableEmissions
();
65
virtual
void
disableEmissions
();
66
virtual
void
emissionsUpdate
();
67
68
public
:
69
70
// Set the current detonation for reaction.
71
static
void
setDetonation
(
const
DtDetonationInteraction
*
theDetonation
);
72
73
static
void
setLethalDetonationRange
(
double
range );
74
static
void
setMunitionFlightTime
(
DtTime
time );
75
76
// set the delta time for next simTick update
77
static
void
setSimDeltaTime
(
DtTime
theDt) {
myDt
= theDt; }
78
79
protected
:
80
81
// delta time for next simTick update
82
static
DtTime
myDt
;
83
84
// Current detonation, if any.
85
static
const
DtDetonationInteraction
*
theDetonation
;
86
87
protected
:
88
89
virtual
void
moveArtParts
();
90
91
protected
:
92
93
DtExerciseConn
*
myExConn
;
94
DtEntityPublisher
*
myEntityPub
;
95
DtEmitterSystemPublisher
*
mySysPub
;
96
DtEntityStateRepository
*
myESR
;
97
DtTopoView
*
myTopoView
;
98
DtReflectedEntityList
*
myRel
;
99
DtEmitterBeamRepository
*
myBeam
;
100
DtObjectPublisherContainer
&
myPublishedObjects
;
101
102
float
mySpeed
;
103
float
myTurnRadius
;
104
float
myTurnRate
;
105
float
myScalarAccel
;
106
double
myBeamTime
;
107
108
DtTaitBryan
myEuler
;
109
DtVector
myPos
;
110
DtVector32
myVel
;
111
DtVector32
myAccel
;
112
DtVector32
myRotRate
;
113
114
float
myTurretAz
;
115
float
myTurretAzRate
;
116
float
myGunElev
;
117
float
myGunElevRate
;
118
119
DtFireInteraction
*
myFire
;
120
DtTime
myDetonateTime
;
121
DtTime
myTimeDestroyed
;
122
bool
myIsDestroyed
;
123
124
bool
myHaveArtParts
;
125
bool
myEmissionsEnabled
;
126
127
DtTime
myTimeSpacing
;
128
129
protected
:
130
static
double
theLethalDetonationRange
;
131
static
DtTime
theMunitionFlightTime
;
132
};
133
134
Document ID: Generated on Mon Jun 22 21:18:40 EDT 2020 from SVN revision 213785
Copyright © 2005-2018 MAK Technologies. All Rights Reserved (
www.mak.com
)