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
DtVector32
& linVelocity,
57
const
DtVector
& location,
58
const
DtBurstDescriptor
&burst,
59
const
DtVector32
& 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
DtVector32
& velocity()
const
;
92
void
setVelocity(
const
DtVector32
& velocity);
93
94
const
DtVector
& worldLocation()
const
;
95
void
setWorldLocation(
const
DtVector
& location);
96
97
const
DtVector32
& entityLocation()
const
;
98
void
setEntityLocation(
const
DtVector32
& 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
DtArticulatedPartCollection
& articulatedParts();
125
127
128
129
130
virtual
const
std::vector<DtVPRecord*>* variableParameterList()
const
;
131
virtual
std::vector<DtVPRecord*>* variableParameterList();
133
134
virtual
void
printData
()
const
;
135
virtual
void
printDataToStream
(std::ostream& stream)
const
;
136
virtual
void
printDataToString
(
DtString
& str)
const
;
137
138
protected
:
139
DtPduKind
internalGetPduKind
()
const
{
return
DtDetonationPduKind
;}
140
141
DtObjectId
att
;
142
DtObjectId
tar
;
143
DtObjectId
mun
;
144
DtEventID
event
;
145
DtVector32
vel
, ent;
146
DtVector
world
;
147
DtBurstDescriptor
theBurst
;
148
DtEntityType
myMunType
;
149
mutable
DtArticulatedPartCollection
myArtPartCollection
;
150
151
std::vector<DtVPRecord*>
myVPRecordCollection
;
//DIS 7 only.
152
};
153
154
155
inline
const
std::vector<DtVPRecord*>*
DtDetonationPdu::variableParameterList
()
const
156
{
157
return
&
myVPRecordCollection
;
158
}
159
160
inline
std::vector<DtVPRecord*>*
DtDetonationPdu::variableParameterList
()
161
{
162
return
&
myVPRecordCollection
;
163
}
164
165
#endif
Document ID: Generated on Tue Mar 1 02:56:17 EST 2016 from SVN revision 162687
Copyright © 2005-2014 VT MÄK. All Rights Reserved (
www.mak.com
)