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 FastTrace 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 public FastTrace(
70 String Id, Location From, Location To) {
71
72 this.Id = Id;
73
74 this.From = From;
75
76 this.To = To;
77
78 }
79
80
81
82
83
84
85
86
87
88
89
90
91
92 public FastTrace() {
93 }
94
95
96
97
98
99
100
101
102
103 protected
104 String Id =
105 null;
106
107
108
109
110
111
112
113 public
114 String getId() {
115 return
116 Id;
117 }
118
119
120
121
122
123
124
125
126 public FastTrace setId(String Id) {
127 this.Id = Id;
128 return this;
129 }
130
131
132
133
134
135
136 protected
137 Location From =
138 null;
139
140
141
142
143
144
145
146 public
147 Location getFrom() {
148 return
149 From;
150 }
151
152
153
154
155
156
157
158
159 public FastTrace setFrom(Location From) {
160 this.From = From;
161 return this;
162 }
163
164
165
166 protected
167 Location To =
168 null;
169
170
171
172
173 public
174 Location getTo() {
175 return
176 To;
177 }
178
179
180
181
182
183 public FastTrace setTo(Location To) {
184 this.To = To;
185 return this;
186 }
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209 public FastTrace(FastTrace original) {
210
211 this.Id=original.Id;
212
213 this.From=original.From;
214
215 this.To=original.To;
216
217 }
218
219
220
221
222 public String toString() {
223 return
224
225 toMessage();
226
227 }
228
229 public String toHtmlString() {
230 return super.toString() +
231
232 "<b>Id</b> : " +
233 String.valueOf(Id) +
234 " <br/> " +
235
236 "<b>From</b> : " +
237 String.valueOf(From) +
238 " <br/> " +
239
240 "<b>To</b> : " +
241 String.valueOf(To) +
242 " <br/> " +
243 "";
244 }
245
246
247
248 public String toMessage() {
249 StringBuffer buf = new StringBuffer();
250 buf.append("FTRACE");
251
252 if (Id != null) {
253 buf.append(" {Id " + Id + "}");
254 }
255
256 if (From != null) {
257 buf.append(" {From " +
258 From.getX() + "," +
259 From.getY() + "," +
260 From.getZ() + "}");
261 }
262
263 if (To != null) {
264 buf.append(" {To " +
265 To.getX() + "," +
266 To.getY() + "," +
267 To.getZ() + "}");
268 }
269
270 return buf.toString();
271 }
272
273 }
274
275