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 abstract class MoverStatic
32 extends InfoMessage
33 implements IStaticWorldObject
34
35 {
36
37
38
39
40
41
42 public MoverStatic()
43 {
44 }
45
46
47
48
49 protected long SimTime;
50
51
52
53
54 @Override
55 public long getSimTime() {
56 return SimTime;
57 }
58
59
60
61
62 protected void setSimTime(long SimTime) {
63 this.SimTime = SimTime;
64 }
65
66
67 @Override
68 public abstract
69 MoverStatic clone();
70
71 @Override
72 public Class getCompositeClass() {
73 return Mover.class;
74 }
75
76
77
78
79
80
81
82
83 public abstract UnrealId getId()
84 ;
85
86
87
88
89
90
91 public abstract boolean isDamageTrig()
92 ;
93
94
95
96
97 public abstract String getType()
98 ;
99
100
101
102
103 public abstract boolean isIsMoving()
104 ;
105
106
107
108
109 public abstract double getMoveTime()
110 ;
111
112
113
114
115
116 public abstract double getOpenTime()
117 ;
118
119
120
121
122 public abstract Location getBasePos()
123 ;
124
125
126
127
128 public abstract Location getBaseRot()
129 ;
130
131
132
133
134 public abstract double getDelayTime()
135 ;
136
137
138
139
140 public abstract UnrealId getNavPointMarker()
141 ;
142
143
144 @Override
145 public boolean isDifferentFrom(IStaticWorldObject other)
146 {
147 if (other == null)
148 {
149 return true;
150 }
151 else if (other == this)
152 {
153 return false;
154 }
155 else
156 {
157 MoverStatic obj = (MoverStatic) other;
158
159
160 if ( !(
161 AdvancedEquals.equalsOrNull(this.getId()
162 , obj.getId()
163 )
164 ) )
165 {
166 System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property Id on object class MoverStatic");
167 return true;
168 }
169
170 if ( !(this.isDamageTrig()
171
172 == obj.isDamageTrig()
173 ) )
174 {
175 System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property DamageTrig on object class MoverStatic");
176 return true;
177 }
178
179 if ( !(
180 AdvancedEquals.equalsOrNull(this.getType()
181 , obj.getType()
182 )
183 ) )
184 {
185 System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property Type on object class MoverStatic");
186 return true;
187 }
188
189 if ( !(this.isIsMoving()
190
191 == obj.isIsMoving()
192 ) )
193 {
194 System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property IsMoving on object class MoverStatic");
195 return true;
196 }
197
198 if ( !(this.getMoveTime()
199
200 == obj.getMoveTime()
201 ) )
202 {
203 System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property MoveTime on object class MoverStatic");
204 return true;
205 }
206
207 if ( !(this.getOpenTime()
208
209 == obj.getOpenTime()
210 ) )
211 {
212 System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property OpenTime on object class MoverStatic");
213 return true;
214 }
215
216 if ( !(
217 AdvancedEquals.equalsOrNull(this.getBasePos()
218 , obj.getBasePos()
219 )
220 ) )
221 {
222 System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property BasePos on object class MoverStatic");
223 return true;
224 }
225
226 if ( !(
227 AdvancedEquals.equalsOrNull(this.getBaseRot()
228 , obj.getBaseRot()
229 )
230 ) )
231 {
232 System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property BaseRot on object class MoverStatic");
233 return true;
234 }
235
236 if ( !(this.getDelayTime()
237
238 == obj.getDelayTime()
239 ) )
240 {
241 System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property DelayTime on object class MoverStatic");
242 return true;
243 }
244
245 if ( !(
246 AdvancedEquals.equalsOrNull(this.getNavPointMarker()
247 , obj.getNavPointMarker()
248 )
249 ) )
250 {
251 System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property NavPointMarker on object class MoverStatic");
252 return true;
253 }
254
255 }
256 return false;
257 }
258
259
260 public String toString() {
261 return
262 super.toString() + "[" +
263
264 "Id = " + String.valueOf(getId()
265 ) + " | " +
266
267 "DamageTrig = " + String.valueOf(isDamageTrig()
268 ) + " | " +
269
270 "Type = " + String.valueOf(getType()
271 ) + " | " +
272
273 "IsMoving = " + String.valueOf(isIsMoving()
274 ) + " | " +
275
276 "MoveTime = " + String.valueOf(getMoveTime()
277 ) + " | " +
278
279 "OpenTime = " + String.valueOf(getOpenTime()
280 ) + " | " +
281
282 "BasePos = " + String.valueOf(getBasePos()
283 ) + " | " +
284
285 "BaseRot = " + String.valueOf(getBaseRot()
286 ) + " | " +
287
288 "DelayTime = " + String.valueOf(getDelayTime()
289 ) + " | " +
290
291 "NavPointMarker = " + String.valueOf(getNavPointMarker()
292 ) + " | " +
293
294 "]";
295 }
296
297
298 public String toHtmlString() {
299 return super.toString() + "[<br/>" +
300
301 "<b>Id</b> = " + String.valueOf(getId()
302 ) + " <br/> " +
303
304 "<b>DamageTrig</b> = " + String.valueOf(isDamageTrig()
305 ) + " <br/> " +
306
307 "<b>Type</b> = " + String.valueOf(getType()
308 ) + " <br/> " +
309
310 "<b>IsMoving</b> = " + String.valueOf(isIsMoving()
311 ) + " <br/> " +
312
313 "<b>MoveTime</b> = " + String.valueOf(getMoveTime()
314 ) + " <br/> " +
315
316 "<b>OpenTime</b> = " + String.valueOf(getOpenTime()
317 ) + " <br/> " +
318
319 "<b>BasePos</b> = " + String.valueOf(getBasePos()
320 ) + " <br/> " +
321
322 "<b>BaseRot</b> = " + String.valueOf(getBaseRot()
323 ) + " <br/> " +
324
325 "<b>DelayTime</b> = " + String.valueOf(getDelayTime()
326 ) + " <br/> " +
327
328 "<b>NavPointMarker</b> = " + String.valueOf(getNavPointMarker()
329 ) + " <br/> " +
330
331 "<br/>]";
332 }
333
334
335
336
337
338
339
340
341
342
343 }
344