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/artPartSpec.h
>
23
24
#include <
matrix/vlMath.h
>
25
26
27
28
#define DtMaxNumDetArtParts 25
29
30
class
DtExerciseConn
;
31
class
DtDetonationPdu
;
32
34
typedef
DtDetonationPdu
DtDetonationInteraction
;
35
36
typedef
void (*
DtDetonationInteractionCb
)(
DtDetonationInteraction
*inter,
37
void
*usr);
38
41
class
DT_DLL_VL
DtDetonationPdu
:
public
DtInteraction
42
{
43
public
:
44
45
enum
{ PduStaticSize=104 };
46
47
public
:
48
DtDetonationPdu
(
DtBufferPtr
buffer =
DtUSE_INTERNAL_BUFFER
);
49
DtDetonationPdu
(
const
DtNetDetonationPdu
*initial,
50
DtBufferPtr
buffer =
DtUSE_INTERNAL_BUFFER
,
DtPduFactory
* pduFactory = 0);
51
52
DtDetonationPdu
(
const
DtEntityIdentifier
&attacker,
53
const
DtEntityIdentifier
&target,
54
const
DtEntityIdentifier
&munition,
55
const
DtEventID
&eventId,
56
const
DtVector
& linVelocity,
57
const
DtVector
& location,
58
const
DtBurstDescriptor
&burst,
59
const
DtVector
& entLocation,
60
DtDetonationResult
result,
61
DtBufferPtr
buffer =
DtUSE_INTERNAL_BUFFER
);
62
64
DtDetonationPdu
(
const
DtFireInteraction
&fire,
65
DtBufferPtr
buffer =
DtUSE_INTERNAL_BUFFER
);
66
68
virtual
~
DtDetonationPdu
();
69
70
static
DtPdu
*create(
const
DtNetPacket
*initial,
71
DtBufferPtr
buffer =
DtUSE_INTERNAL_BUFFER
,
DtPduFactory
* pduFactory = 0);
72
73
static
void
addCallback(
DtExerciseConn
*conn,
74
DtDetonationInteractionCb
cb,
void
*usr);
75
static
void
removeCallback(
DtExerciseConn
*conn,
76
DtDetonationInteractionCb
cb,
void
*usr);
77
78
/****************** INSPECTOR FUNCTIONS *******************/
79
const
DtObjectId
&attackerId()
const
;
80
void
setAttackerId(
const
DtObjectId
&
id
);
81
82
const
DtObjectId
&targetId()
const
;
83
void
setTargetId(
const
DtObjectId
&
id
);
84
85
const
DtObjectId
&munitionId()
const
;
86
void
setMunitionId(
const
DtObjectId
&
id
);
87
88
const
DtEventID
&eventId()
const
;
89
void
setEventId(
const
DtEventID
&
id
);
90
91
const
DtVector
& velocity()
const
;
92
void
setVelocity(
const
DtVector
& velocity);
93
94
const
DtVector
& worldLocation()
const
;
95
void
setWorldLocation(
const
DtVector
& location);
96
97
const
DtVector
& entityLocation()
const
;
98
void
setEntityLocation(
const
DtVector
& location);
99
100
DtDetonationResult
result()
const
;
101
void
setResult(
DtDetonationResult
result);
102
103
DtDetonatorFuze
fuseType()
const
;
104
void
setFuseType(
DtDetonatorFuze
fuse);
105
106
const
DtEntityType
&munitionType()
const
;
107
void
setMunitionType(
const
DtEntityType
&munType);
108
109
int
quantity()
const
;
110
void
setQuantity(
int
quant);
111
112
int
rate()
const
;
113
void
setRate(
int
rate);
114
115
DtWarheadType
warheadType()
const
;
116
void
setWarheadType(
DtWarheadType
type);
117
119
const
DtBurstDescriptor
&burst()
const
;
120
void
setBurst(
const
DtBurstDescriptor
&burst);
121
122
void
setArticulatedParts(
const
DtArticulatedPartCollection
& apList);
123
const
DtArticulatedPartCollection
& articulatedParts()
const
;
124
126
127
128
129
virtual
const
std::vector<DtVPRecord*>* variableParameterList()
const
;
130
virtual
std::vector<DtVPRecord*>* variableParameterList();
132
133
virtual
void
printData
()
const
;
134
virtual
void
printDataToStream
(std::ostream& stream)
const
;
135
virtual
void
printDataToString
(
DtString
& str)
const
;
136
137
protected
:
138
DtPduKind
internalGetPduKind
()
const
{
return
DtDetonationPduKind
;}
139
140
DtObjectId
att
;
141
DtObjectId
tar
;
142
DtObjectId
mun
;
143
DtEventID
event
;
144
DtVector
vel,
world
, ent;
145
DtBurstDescriptor
theBurst
;
146
DtEntityType
myMunType
;
147
mutable
DtArticulatedPartCollection
myArtPartCollection
;
148
149
std::vector<DtVPRecord*>
myVPRecordCollection
;
//DIS 7 only.
150
};
151
152
153
inline
const
std::vector<DtVPRecord*>*
DtDetonationPdu::variableParameterList
()
const
154
{
155
return
&
myVPRecordCollection
;
156
}
157
158
inline
std::vector<DtVPRecord*>*
DtDetonationPdu::variableParameterList
()
159
{
160
return
&
myVPRecordCollection
;
161
}
162
163
#endif
Document ID: Generated on Wed Jan 7 13:31:29 EST 2015 from SVN revision 149162
Copyright © 2005-2014 VT MÄK. All Rights Reserved (
www.mak.com
)