1
2
3
4
5
6
7
8
9
10 package
11 cz.cuni.amis.pogamut.udk.communication.messages.gbcommands;
12 import java.util.*;
13 import javax.vecmath.*;
14 import cz.cuni.amis.pogamut.base.communication.messages.*;
15 import cz.cuni.amis.pogamut.base.communication.worldview.*;
16 import cz.cuni.amis.pogamut.base.communication.worldview.event.*;
17 import cz.cuni.amis.pogamut.base.communication.worldview.object.*;
18 import cz.cuni.amis.pogamut.base.communication.translator.event.*;
19 import cz.cuni.amis.pogamut.base3d.worldview.object.*;
20 import cz.cuni.amis.pogamut.base3d.worldview.object.event.*;
21 import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;
22 import cz.cuni.amis.pogamut.udk.communication.messages.*;
23 import cz.cuni.amis.pogamut.udk.communication.worldview.objects.*;
24 import cz.cuni.amis.pogamut.udk.communication.translator.itemdescriptor.*;
25 import cz.cuni.amis.pogamut.udk.communication.messages.ItemType.Category;
26 import cz.cuni.amis.utils.exception.*;
27 import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult.Result;
28 import cz.cuni.amis.utils.SafeEquals;
29 import cz.cuni.amis.pogamut.multi.communication.worldview.object.*;
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44 public class
45 Trace extends
46 CommandMessage
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 public Trace(
75 String Id, Location From, Location To, boolean TraceActors) {
76
77 this.Id = Id;
78
79 this.From = From;
80
81 this.To = To;
82
83 this.TraceActors = TraceActors;
84
85 }
86
87
88
89
90
91
92
93
94
95
96
97
98
99 public Trace() {
100 }
101
102
103
104
105
106
107
108
109
110 protected
111 String Id =
112 null;
113
114
115
116
117
118
119
120 public
121 String getId() {
122 return
123 Id;
124 }
125
126
127
128
129
130
131
132
133 public Trace setId(String Id) {
134 this.Id = Id;
135 return this;
136 }
137
138
139
140
141
142
143 protected
144 Location From =
145 null;
146
147
148
149
150
151
152
153 public
154 Location getFrom() {
155 return
156 From;
157 }
158
159
160
161
162
163
164
165
166 public Trace setFrom(Location From) {
167 this.From = From;
168 return this;
169 }
170
171
172
173 protected
174 Location To =
175 null;
176
177
178
179
180 public
181 Location getTo() {
182 return
183 To;
184 }
185
186
187
188
189
190 public Trace setTo(Location To) {
191 this.To = To;
192 return this;
193 }
194
195
196
197
198
199
200
201 protected
202 boolean TraceActors =
203 false;
204
205
206
207
208
209
210
211
212 public
213 boolean isTraceActors() {
214 return
215 TraceActors;
216 }
217
218
219
220
221
222
223
224
225
226 public Trace setTraceActors(boolean TraceActors) {
227 this.TraceActors = TraceActors;
228 return this;
229 }
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252 public Trace(Trace original) {
253
254 this.Id=original.Id;
255
256 this.From=original.From;
257
258 this.To=original.To;
259
260 this.TraceActors=original.TraceActors;
261
262 }
263
264
265
266
267 public String toString() {
268 return
269
270 toMessage();
271
272 }
273
274 public String toHtmlString() {
275 return super.toString() +
276
277 "<b>Id</b> : " +
278 String.valueOf(Id) +
279 " <br/> " +
280
281 "<b>From</b> : " +
282 String.valueOf(From) +
283 " <br/> " +
284
285 "<b>To</b> : " +
286 String.valueOf(To) +
287 " <br/> " +
288
289 "<b>TraceActors</b> : " +
290 String.valueOf(TraceActors) +
291 " <br/> " +
292 "";
293 }
294
295
296
297 public String toMessage() {
298 StringBuffer buf = new StringBuffer();
299 buf.append("TRACE");
300
301 if (Id != null) {
302 buf.append(" {Id " + Id + "}");
303 }
304
305 if (From != null) {
306 buf.append(" {From " +
307 From.getX() + "," +
308 From.getY() + "," +
309 From.getZ() + "}");
310 }
311
312 if (To != null) {
313 buf.append(" {To " +
314 To.getX() + "," +
315 To.getY() + "," +
316 To.getZ() + "}");
317 }
318
319 buf.append(" {TraceActors " + TraceActors + "}");
320
321 return buf.toString();
322 }
323
324 }
325
326