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