1 package cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages;
2
3
4 import java.util.*;import javax.vecmath.*;import cz.cuni.amis.pogamut.base.communication.messages.*;import cz.cuni.amis.pogamut.base.communication.worldview.*;import cz.cuni.amis.pogamut.base.communication.worldview.event.*;import cz.cuni.amis.pogamut.base.communication.worldview.object.*;import cz.cuni.amis.pogamut.multi.communication.worldview.object.*;import cz.cuni.amis.pogamut.base.communication.translator.event.*;import cz.cuni.amis.pogamut.multi.communication.translator.event.*;import cz.cuni.amis.pogamut.base3d.worldview.object.*;import cz.cuni.amis.pogamut.base3d.worldview.object.event.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.*;import cz.cuni.amis.pogamut.ut2004.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.ItemType.Category;import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;import cz.cuni.amis.utils.exception.*;import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult.Result;import cz.cuni.amis.utils.SafeEquals;import cz.cuni.amis.pogamut.base.agent.*;import cz.cuni.amis.pogamut.multi.agent.*;import cz.cuni.amis.pogamut.multi.communication.worldview.property.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.property.*;import cz.cuni.amis.utils.token.*;import cz.cuni.amis.utils.*;
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 public class VehicleCompositeImpl
32 extends Vehicle
33 {
34
35
36
37
38
39
40 public VehicleCompositeImpl()
41 {
42 }
43
44
45
46
47
48
49
50
51
52 public VehicleCompositeImpl(
53 VehicleLocalImpl partLocal,
54 VehicleSharedImpl partShared,
55 VehicleStaticImpl partStatic
56 ) {
57 this.partLocal = partLocal;
58 this.partShared = partShared;
59 this.partStatic = partStatic;
60 }
61
62
63
64
65
66
67 public VehicleCompositeImpl(VehicleCompositeImpl original) {
68 this.partLocal = partLocal;
69 this.partShared = partShared;
70 this.partStatic = partStatic;
71 }
72
73
74 @Override
75 public void setSimTime(long SimTime) {
76 super.setSimTime(SimTime);
77 }
78
79
80 protected
81 VehicleStaticImpl
82 partStatic;
83
84 @Override
85 public VehicleStatic getStatic() {
86 return partStatic;
87 }
88
89 protected
90 VehicleLocalImpl
91 partLocal;
92
93 @Override
94 public VehicleLocal getLocal() {
95 return partLocal;
96 }
97
98 VehicleSharedImpl
99 partShared;
100
101 @Override
102 public VehicleShared getShared() {
103 return partShared;
104 }
105
106
107
108 @Override
109
110
111
112
113 public UnrealId getId()
114 {
115 return
116
117 partStatic.
118 getId()
119 ;
120 }
121
122 @Override
123
124
125
126
127
128
129 public Rotation getRotation()
130 {
131 return
132
133 partShared.
134 getRotation()
135 ;
136 }
137
138 @Override
139
140
141
142
143
144
145 public Location getLocation()
146 {
147 return
148
149 partShared.
150 getLocation()
151 ;
152 }
153
154 @Override
155
156
157
158
159
160
161
162 public Velocity getVelocity()
163 {
164 return
165
166 partShared.
167 getVelocity()
168 ;
169 }
170
171 @Override
172
173
174
175
176
177
178 public boolean isVisible()
179 {
180 return
181
182 partLocal.
183 isVisible()
184 ;
185 }
186
187 @Override
188
189
190
191
192
193
194
195 public Integer getTeam()
196 {
197 return
198
199 partShared.
200 getTeam()
201 ;
202 }
203
204 @Override
205
206
207
208
209
210
211 public Integer getHealth()
212 {
213 return
214
215 partShared.
216 getHealth()
217 ;
218 }
219
220 @Override
221
222
223
224
225
226
227 public Integer getArmor()
228 {
229 return
230
231 partShared.
232 getArmor()
233 ;
234 }
235
236 @Override
237
238
239
240
241 public UnrealId getDriver()
242 {
243 return
244
245 partShared.
246 getDriver()
247 ;
248 }
249
250 @Override
251
252
253
254
255
256
257 public boolean isTeamLocked()
258 {
259 return
260
261 partShared.
262 isTeamLocked()
263 ;
264 }
265
266 @Override
267
268
269
270
271
272
273 public String getType()
274 {
275 return
276
277 partStatic.
278 getType()
279 ;
280 }
281
282
283 public String toString() {
284 return
285 super.toString() + "[" +
286
287 "Static = " + String.valueOf(partStatic) + " | Local = " + String.valueOf(partLocal) + " | Shared = " + String.valueOf(partShared) + " ]" +
288
289 "]";
290 }
291
292
293 public String toHtmlString() {
294 return super.toString() + "[<br/>" +
295
296 "Static = " + String.valueOf(partStatic) + " <br/> Local = " + String.valueOf(partLocal) + " <br/> Shared = " + String.valueOf(partShared) + " ]" +
297
298 "<br/>]";
299 }
300
301
302
303
304
305
306
307
308
309
310 }
311