VR-Forces 4.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
vrvVrl
DtDetonationElementProcessor.h
Go to the documentation of this file.
1
/*****************************************************************************
2
* Copyright (c) 2012 MAK Technologies, Inc.
3
* All rights reserved.
4
*****************************************************************************/
5
9
10
#pragma once
11
12
#include <
vrvVrl/vrvVrl.h
>
13
#include <
vrvUtil/DtVirtualBaseClass.h
>
14
#include <
vrvUtil/DtSignalConnectionManager.h
>
15
#include <set>
16
#include <
vrvCore/DtVisualizerSet.h
>
17
#include <
vrvCore/DtDetonationInteractionStateListener.h
>
18
19
#include <vl/detonateInter.h>
20
21
#ifndef DT_PROTOCOL_NAMESPACE
22
#error Namespace Protocol Macro DT_PROTOCOL_NAMESPACE not defined.
23
#endif
24
25
namespace
makVrv
26
{
27
28
class
DtAgent;
29
class
DtModelAgent;
30
31
namespace
DT_PROTOCOL_NAMESPACE
32
{
33
class
DtVrlinkConnection;
34
37
class
DL_DLL_IGCONVRLINK
DtVrlinkDetonationInteractionStateListener
38
:
public
DtDetonationInteractionStateListener
39
{
40
public
:
41
42
DtVrlinkDetonationInteractionStateListener
(
DtUniqueID
elementId )
43
:
DtDetonationInteractionStateListener
( elementId )
44
, myForceId( 0 )
45
{
46
}
47
void
setForceId(
int
i)
48
{
49
myForceId = i;
50
}
51
52
int
forceId()
const
53
{
54
return
myForceId;
55
}
56
57
void
setDetonationPdu(
const
DtDetonationInteraction
& pdu)
58
{
59
myDetonation = pdu;
60
}
61
62
const
DtDetonationInteraction
& detonation()
const
63
{
64
return
myDetonation;
65
}
66
67
const
DtGlobalObjectDesignator& attackerId()
const
68
{
69
return
myDetonation.attackerId();
70
}
71
72
const
DtGlobalObjectDesignator& targetId()
const
73
{
74
return
myDetonation.targetId();
75
}
76
77
int
detonationResult()
const
78
{
79
return
myDetonation.result();
80
}
81
82
protected
:
83
84
int
myForceId
;
85
86
DtDetonationInteraction
myDetonation
;
87
88
};
89
90
class
DL_DLL_IGCONVRLINK
DtVrlinkDetonationVisualizerSet
:
public
DtVisualizerSet
91
{
92
public
:
93
94
DtVrlinkDetonationVisualizerSet
(
DtVrlinkConnection
& c );
95
96
virtual
~
DtVrlinkDetonationVisualizerSet
();
97
98
virtual
void
visualize(
const
DtUnicode
& visDefName,
int
modelSet);
99
virtual
void
setLocation(
const
DtVector
&);
100
101
DtVrlinkDetonationInteractionStateListener
& detonationListener()
102
{
103
return
myInteractionListener;
104
}
105
106
protected
:
107
108
DtVrlinkDetonationInteractionStateListener
myInteractionListener
;
109
110
};
111
112
class
DL_DLL_IGCONVRLINK
DtDetonationElementProcessor
:
public
DtVirtualBaseClass
113
{
114
public
:
115
118
static
void
registerInstance(
DtVrlinkConnection
& conn,
119
DtDetonationElementProcessor
* instance);
120
122
static
DtDetonationElementProcessor
* findInstance(
DtVrlinkConnection
& conn);
123
125
DtDetonationElementProcessor
(
DtVrlinkConnection
& baseSimulation);
126
128
virtual
~
DtDetonationElementProcessor
();
129
131
void
processInteraction(
const
DtDetonationInteraction
& fireInteraction );
132
133
protected
:
134
135
const
DtUnicode
& chooseModelDefinition(
136
const
std::vector<DtUnicode>& definitions);
137
138
protected
:
139
140
DtVrlinkConnection
&
mySimulation
;
141
DtSignalConnectionManager
myConnections
;
142
143
bool
myFireDetonatedEnabledFlag
;
144
145
};
146
147
}
148
}
Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (
www.mak.com
)