1
2
3
4
5
6
7
8
9
10
11
12 package cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands;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.*;
13
14
15
16
17
18
19
20
21 public class SetEmotionalEmitter
22 extends CommandMessage
23 {
24
25
26
27 public static final String PROTOTYPE =
28 " {Disable False} {Pause False} {FirstC 0,0,0} {SecondC 0,0,0} {StartVelocity 0,0,0} {EndVelocity 0,0,0} {VelocityRange 0} {Size 0,0,0} {LifeTime 0} {FadeTime 0,0,0} ";
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76 public SetEmotionalEmitter(
77 Boolean Disable, Boolean Pause, Vector3d FirstC, Vector3d SecondC, Velocity StartVelocity, Velocity EndVelocity, Double VelocityRange, Vector3d Size, Double LifeTime, Vector3d FadeTime
78 ) {
79
80 this.Disable = Disable;
81
82 this.Pause = Pause;
83
84 this.FirstC = FirstC;
85
86 this.SecondC = SecondC;
87
88 this.StartVelocity = StartVelocity;
89
90 this.EndVelocity = EndVelocity;
91
92 this.VelocityRange = VelocityRange;
93
94 this.Size = Size;
95
96 this.LifeTime = LifeTime;
97
98 this.FadeTime = FadeTime;
99
100 }
101
102
103
104
105
106
107
108
109
110
111
112
113
114 public SetEmotionalEmitter() {
115 }
116
117
118
119
120
121
122
123 public SetEmotionalEmitter(SetEmotionalEmitter original) {
124
125 this.Disable = original.Disable;
126
127 this.Pause = original.Pause;
128
129 this.FirstC = original.FirstC;
130
131 this.SecondC = original.SecondC;
132
133 this.StartVelocity = original.StartVelocity;
134
135 this.EndVelocity = original.EndVelocity;
136
137 this.VelocityRange = original.VelocityRange;
138
139 this.Size = original.Size;
140
141 this.LifeTime = original.LifeTime;
142
143 this.FadeTime = original.FadeTime;
144
145 }
146
147
148
149
150
151
152 protected
153 Boolean Disable =
154
155 null
156 ;
157
158
159
160
161
162
163
164
165 public Boolean isDisable()
166
167 {
168 return
169 Disable;
170 }
171
172
173
174
175
176
177
178
179
180 public SetEmotionalEmitter
181 setDisable(Boolean Disable)
182
183 {
184 this.Disable = Disable;
185 return this;
186 }
187
188
189
190
191
192
193 protected
194 Boolean Pause =
195
196 null
197 ;
198
199
200
201
202
203
204
205
206 public Boolean isPause()
207
208 {
209 return
210 Pause;
211 }
212
213
214
215
216
217
218
219
220
221 public SetEmotionalEmitter
222 setPause(Boolean Pause)
223
224 {
225 this.Pause = Pause;
226 return this;
227 }
228
229
230
231
232
233
234 protected
235 Vector3d FirstC =
236
237 null
238 ;
239
240
241
242
243
244
245
246
247 public Vector3d getFirstC()
248
249 {
250 return
251 FirstC;
252 }
253
254
255
256
257
258
259
260
261
262 public SetEmotionalEmitter
263 setFirstC(Vector3d FirstC)
264
265 {
266 this.FirstC = FirstC;
267 return this;
268 }
269
270
271
272
273
274
275 protected
276 Vector3d SecondC =
277
278 null
279 ;
280
281
282
283
284
285
286
287
288 public Vector3d getSecondC()
289
290 {
291 return
292 SecondC;
293 }
294
295
296
297
298
299
300
301
302
303 public SetEmotionalEmitter
304 setSecondC(Vector3d SecondC)
305
306 {
307 this.SecondC = SecondC;
308 return this;
309 }
310
311
312
313
314
315
316
317 protected
318 Velocity StartVelocity =
319
320 null
321 ;
322
323
324
325
326
327
328
329
330
331 public Velocity getStartVelocity()
332
333 {
334 return
335 StartVelocity;
336 }
337
338
339
340
341
342
343
344
345
346
347 public SetEmotionalEmitter
348 setStartVelocity(Velocity StartVelocity)
349
350 {
351 this.StartVelocity = StartVelocity;
352 return this;
353 }
354
355
356
357
358
359
360
361 protected
362 Velocity EndVelocity =
363
364 null
365 ;
366
367
368
369
370
371
372
373
374
375 public Velocity getEndVelocity()
376
377 {
378 return
379 EndVelocity;
380 }
381
382
383
384
385
386
387
388
389
390
391 public SetEmotionalEmitter
392 setEndVelocity(Velocity EndVelocity)
393
394 {
395 this.EndVelocity = EndVelocity;
396 return this;
397 }
398
399
400
401
402
403
404 protected
405 Double VelocityRange =
406
407 null
408 ;
409
410
411
412
413
414
415
416
417 public Double getVelocityRange()
418
419 {
420 return
421 VelocityRange;
422 }
423
424
425
426
427
428
429
430
431
432 public SetEmotionalEmitter
433 setVelocityRange(Double VelocityRange)
434
435 {
436 this.VelocityRange = VelocityRange;
437 return this;
438 }
439
440
441
442
443
444
445 protected
446 Vector3d Size =
447
448 null
449 ;
450
451
452
453
454
455
456
457
458 public Vector3d getSize()
459
460 {
461 return
462 Size;
463 }
464
465
466
467
468
469
470
471
472
473 public SetEmotionalEmitter
474 setSize(Vector3d Size)
475
476 {
477 this.Size = Size;
478 return this;
479 }
480
481
482
483
484
485
486
487 protected
488 Double LifeTime =
489
490 null
491 ;
492
493
494
495
496
497
498
499
500
501 public Double getLifeTime()
502
503 {
504 return
505 LifeTime;
506 }
507
508
509
510
511
512
513
514
515
516
517 public SetEmotionalEmitter
518 setLifeTime(Double LifeTime)
519
520 {
521 this.LifeTime = LifeTime;
522 return this;
523 }
524
525
526
527
528
529
530
531
532 protected
533 Vector3d FadeTime =
534
535 null
536 ;
537
538
539
540
541
542
543
544
545
546
547 public Vector3d getFadeTime()
548
549 {
550 return
551 FadeTime;
552 }
553
554
555
556
557
558
559
560
561
562
563
564 public SetEmotionalEmitter
565 setFadeTime(Vector3d FadeTime)
566
567 {
568 this.FadeTime = FadeTime;
569 return this;
570 }
571
572 public String toString() {
573 return toMessage();
574 }
575
576 public String toHtmlString() {
577 return super.toString() + "[<br/>" +
578
579 "<b>Disable</b> = " +
580 String.valueOf(isDisable()
581 ) +
582 " <br/> " +
583
584 "<b>Pause</b> = " +
585 String.valueOf(isPause()
586 ) +
587 " <br/> " +
588
589 "<b>FirstC</b> = " +
590 String.valueOf(getFirstC()
591 ) +
592 " <br/> " +
593
594 "<b>SecondC</b> = " +
595 String.valueOf(getSecondC()
596 ) +
597 " <br/> " +
598
599 "<b>StartVelocity</b> = " +
600 String.valueOf(getStartVelocity()
601 ) +
602 " <br/> " +
603
604 "<b>EndVelocity</b> = " +
605 String.valueOf(getEndVelocity()
606 ) +
607 " <br/> " +
608
609 "<b>VelocityRange</b> = " +
610 String.valueOf(getVelocityRange()
611 ) +
612 " <br/> " +
613
614 "<b>Size</b> = " +
615 String.valueOf(getSize()
616 ) +
617 " <br/> " +
618
619 "<b>LifeTime</b> = " +
620 String.valueOf(getLifeTime()
621 ) +
622 " <br/> " +
623
624 "<b>FadeTime</b> = " +
625 String.valueOf(getFadeTime()
626 ) +
627 " <br/> " +
628
629 "<br/>]"
630 ;
631 }
632
633 public String toMessage() {
634 StringBuffer buf = new StringBuffer();
635 buf.append("SETEMIT");
636
637 if (Disable != null) {
638 buf.append(" {Disable " + Disable + "}");
639 }
640
641 if (Pause != null) {
642 buf.append(" {Pause " + Pause + "}");
643 }
644
645 if (FirstC != null) {
646 buf.append(" {FirstC " +
647 FirstC.getX() + "," +
648 FirstC.getY() + "," +
649 FirstC.getZ() + "}");
650 }
651
652 if (SecondC != null) {
653 buf.append(" {SecondC " +
654 SecondC.getX() + "," +
655 SecondC.getY() + "," +
656 SecondC.getZ() + "}");
657 }
658
659 if (StartVelocity != null) {
660 buf.append(" {StartVelocity " +
661 StartVelocity.getX() + "," +
662 StartVelocity.getY() + "," +
663 StartVelocity.getZ() + "}");
664 }
665
666 if (EndVelocity != null) {
667 buf.append(" {EndVelocity " +
668 EndVelocity.getX() + "," +
669 EndVelocity.getY() + "," +
670 EndVelocity.getZ() + "}");
671 }
672
673 if (VelocityRange != null) {
674 buf.append(" {VelocityRange " + VelocityRange + "}");
675 }
676
677 if (Size != null) {
678 buf.append(" {Size " +
679 Size.getX() + "," +
680 Size.getY() + "," +
681 Size.getZ() + "}");
682 }
683
684 if (LifeTime != null) {
685 buf.append(" {LifeTime " + LifeTime + "}");
686 }
687
688 if (FadeTime != null) {
689 buf.append(" {FadeTime " +
690 FadeTime.getX() + "," +
691 FadeTime.getY() + "," +
692 FadeTime.getZ() + "}");
693 }
694
695 return buf.toString();
696 }
697
698
699
700
701
702 }
703