VR-Link API Documentation for HLA 1.3
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
38
virtual
~DtVehicleSim
();
39
41
virtual
void
init
(
DtConstVector
initPos,
double
initSpeed,
42
double
initHeading,
double
initTRadius,
43
double
initPitch,
bool
autoRoll,
double
initRoll );
44
46
virtual
void
simulate
();
47
49
virtual
void
fireMunition
(
const
DtGlobalObjectDesignator
& tg );
50
virtual
void
fireMunition
();
51
virtual
void
detonateMunition
();
52
virtual
void
munitionUpdate
();
53
55
virtual
void
reactToDetonation
();
56
virtual
int
checkDetonation
();
57
virtual
void
reactToDamage
();
58
virtual
bool
isDestroyed
();
59
virtual
DtTime
timeDestroyed
();
60
62
virtual
void
toggleEmissions
();
63
virtual
void
enableEmissions
();
64
virtual
void
disableEmissions
();
65
virtual
void
emissionsUpdate
();
66
67
public
:
68
69
// Set the current detonation for reaction.
70
static
void
setDetonation
(
const
DtDetonationInteraction
*
theDetonation
);
71
72
static
void
setLethalDetonationRange
(
double
range );
73
static
void
setMunitionFlightTime
(
DtTime
time );
74
75
// set the delta time for next simTick update
76
static
void
setSimDeltaTime
(
DtTime
theDt) {
myDt
= theDt; }
77
78
protected
:
79
80
// delta time for next simTick update
81
static
DtTime
myDt
;
82
83
// Current detonation, if any.
84
static
const
DtDetonationInteraction
*
theDetonation
;
85
86
protected
:
87
88
virtual
void
moveArtParts
();
89
90
protected
:
91
92
DtExerciseConn
*
myExConn
;
93
DtEntityPublisher
*
myEntityPub
;
94
DtEmitterSystemPublisher
*
mySysPub
;
95
DtEntityStateRepository
*
myESR
;
96
DtTopoView
*
myTopoView
;
97
DtReflectedEntityList
*
myRel
;
98
DtEmitterBeamRepository
*
myBeam
;
99
DtObjectPublisherContainer
&
myPublishedObjects
;
100
101
float
mySpeed
;
102
float
myTurnRadius
;
103
float
myTurnRate
;
104
float
myScalarAccel
;
105
double
myBeamTime
;
106
107
DtTaitBryan
myEuler
;
108
DtVector
myPos
;
109
DtVector32
myVel
;
110
DtVector32
myAccel
;
111
DtVector32
myRotRate
;
112
113
float
myTurretAz
;
114
float
myTurretAzRate
;
115
float
myGunElev
;
116
float
myGunElevRate
;
117
118
DtFireInteraction
*
myFire
;
119
DtTime
myDetonateTime
;
120
DtTime
myTimeDestroyed
;
121
bool
myIsDestroyed
;
122
123
bool
myHaveArtParts
;
124
bool
myEmissionsEnabled
;
125
126
protected
:
127
static
double
theLethalDetonationRange
;
128
static
DtTime
theMunitionFlightTime
;
129
};
130
131
Document ID: Generated on Fri Dec 2 02:42:08 EST 2016 from SVN revision 171416
Copyright © 2005-2016 VT MÄK. All Rights Reserved (
www.mak.com
)