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
include
vl
detonationPdu.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 1992-2013 VT MAK
3
** All rights reserved.
4
*********************************************************************/
5
6
9
10
#pragma once
11
12
#if DtDIS
13
14
#include "
interaction.h
"
15
#include "
packets/detonationP.h
"
16
#include "
hostStructs.h
"
17
#include "
eventId.h
"
18
#include "
fireInteraction.h
"
19
#include <
vl/vpRecord.h
>
20
21
#include <
vlpi/articulatedPartCollection.h
>
22
#include <
vlpi/attachedPartCollection.h
>
23
#include <
vlpi/artPartSpec.h
>
24
25
#include <
matrix/vlMath.h
>
26
27
28
29
#define DtMaxNumDetArtParts 25
30
31
class
DtExerciseConn
;
32
class
DtDetonationPdu
;
33
35
typedef
DtDetonationPdu
DtDetonationInteraction
;
36
37
typedef
void (*
DtDetonationInteractionCb
)(
DtDetonationInteraction
*inter,
38
void
*usr);
39
42
class
DT_DLL_VL
DtDetonationPdu
:
public
DtInteraction
43
{
44
public
:
45
46
enum
{ PduStaticSize=104 };
47
48
public
:
49
DtDetonationPdu
(
DtBufferPtr
buffer =
DtUSE_INTERNAL_BUFFER
);
50
DtDetonationPdu
(
const
DtNetDetonationPdu
*initial,
51
DtBufferPtr
buffer =
DtUSE_INTERNAL_BUFFER
,
DtPduFactory
* pduFactory = 0);
52
53
DtDetonationPdu
(
const
DtEntityIdentifier
&attacker,
54
const
DtEntityIdentifier
&target,
55
const
DtEntityIdentifier
&munition,
56
const
DtEventID
&eventId,
57
const
DtVector32
& linVelocity,
58
const
DtVector
& location,
59
const
DtBurstDescriptor
&burst,
60
const
DtVector32
& entLocation,
61
DtDetonationResult
result,
62
DtBufferPtr
buffer =
DtUSE_INTERNAL_BUFFER
);
63
65
DtDetonationPdu
(
const
DtFireInteraction
&fire,
66
DtBufferPtr
buffer =
DtUSE_INTERNAL_BUFFER
);
67
69
virtual
~
DtDetonationPdu
();
70
71
static
DtPdu
*create(
const
DtNetPacket
*initial,
72
DtBufferPtr
buffer =
DtUSE_INTERNAL_BUFFER
,
DtPduFactory
* pduFactory = 0);
73
74
static
void
addCallback(
DtExerciseConn
*conn,
75
DtDetonationInteractionCb
cb,
void
*usr);
76
static
void
removeCallback(
DtExerciseConn
*conn,
77
DtDetonationInteractionCb
cb,
void
*usr);
78
79
/****************** INSPECTOR FUNCTIONS *******************/
80
const
DtObjectId
&attackerId()
const
;
81
void
setAttackerId(
const
DtObjectId
&
id
);
82
83
const
DtObjectId
&targetId()
const
;
84
void
setTargetId(
const
DtObjectId
&
id
);
85
86
const
DtObjectId
&munitionId()
const
;
87
void
setMunitionId(
const
DtObjectId
&
id
);
88
89
const
DtEventID
&eventId()
const
;
90
void
setEventId(
const
DtEventID
&
id
);
91
92
const
DtVector32
& velocity()
const
;
93
void
setVelocity(
const
DtVector32
& velocity);
94
95
const
DtVector
& worldLocation()
const
;
96
void
setWorldLocation(
const
DtVector
& location);
97
98
const
DtVector32
& entityLocation()
const
;
99
void
setEntityLocation(
const
DtVector32
& location);
100
101
DtDetonationResult
result()
const
;
102
void
setResult(
DtDetonationResult
result);
103
104
DtDetonatorFuze
fuseType()
const
;
105
void
setFuseType(
DtDetonatorFuze
fuse);
106
107
const
DtEntityType
&munitionType()
const
;
108
void
setMunitionType(
const
DtEntityType
&munType);
109
110
int
quantity()
const
;
111
void
setQuantity(
int
quant);
112
113
int
rate()
const
;
114
void
setRate(
int
rate);
115
116
DtWarheadType
warheadType()
const
;
117
void
setWarheadType(
DtWarheadType
type);
118
120
const
DtBurstDescriptor
&burst()
const
;
121
void
setBurst(
const
DtBurstDescriptor
&burst);
122
123
void
setArticulatedParts(
const
DtArticulatedPartCollection
& apList);
124
const
DtArticulatedPartCollection
& articulatedParts()
const
;
125
DtArticulatedPartCollection
& articulatedParts();
126
127
void
setAttachedParts(
const
DtAttachedPartCollection
& apList);
128
const
DtAttachedPartCollection
& attachedParts()
const
;
129
DtAttachedPartCollection
& attachedParts();
130
132
133
134
135
virtual
const
std::vector<DtVPRecord*>* variableParameterList()
const
;
136
virtual
std::vector<DtVPRecord*>* variableParameterList();
138
139
virtual
void
printData
()
const
;
140
virtual
void
printDataToStream
(std::ostream& stream)
const
;
141
virtual
void
printDataToString
(
DtString
& str)
const
;
142
143
protected
:
144
DtPduKind
internalGetPduKind
()
const
{
return
DtDetonationPduKind
;}
145
146
DtObjectId
att
;
147
DtObjectId
tar
;
148
DtObjectId
mun
;
149
DtEventID
event
;
150
DtVector32
vel
, ent;
151
DtVector
world
;
152
DtBurstDescriptor
theBurst
;
153
DtEntityType
myMunType
;
154
unsigned
myArtPartCount
;
155
unsigned
myAttPartCount
;
156
mutable
DtArticulatedPartCollection
myArtPartCollection
;
157
mutable
DtAttachedPartCollection
myAttPartCollection
;
158
159
std::vector<DtVPRecord*>
myVPRecordCollection
;
//DIS 7 only.
160
};
161
162
163
inline
const
std::vector<DtVPRecord*>*
DtDetonationPdu::variableParameterList
()
const
164
{
165
return
&
myVPRecordCollection
;
166
}
167
168
inline
std::vector<DtVPRecord*>*
DtDetonationPdu::variableParameterList
()
169
{
170
return
&
myVPRecordCollection
;
171
}
172
173
#endif
Document ID: Generated on Thu Feb 22 04:26:36 EST 2018 from SVN revision 186468
Copyright © 2005-2016 VT MÄK. All Rights Reserved (
www.mak.com
)