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 public class Rotate
19 extends CommandMessage
20 {
21
22
23
24 public static final String PROTOTYPE =
25 " {Amount 0} {Axis text} ";
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44 public Rotate(
45 Integer Amount, String Axis
46 ) {
47
48 this.Amount = Amount;
49
50 this.Axis = Axis;
51
52 }
53
54
55
56
57
58
59
60
61
62
63 public Rotate() {
64 }
65
66
67
68
69
70
71
72 public Rotate(Rotate original) {
73
74 this.Amount = original.Amount;
75
76 this.Axis = original.Axis;
77
78 }
79
80
81
82
83
84
85
86 protected
87 Integer Amount =
88
89 null
90 ;
91
92
93
94
95
96
97
98
99
100 public Integer getAmount()
101
102 {
103 return
104 Amount;
105 }
106
107
108
109
110
111
112
113
114
115
116 public Rotate
117 setAmount(Integer Amount)
118
119 {
120 this.Amount = Amount;
121 return this;
122 }
123
124
125
126
127
128
129
130
131 protected
132 String Axis =
133
134 null
135 ;
136
137
138
139
140
141
142
143
144
145
146 public String getAxis()
147
148 {
149 return
150 Axis;
151 }
152
153
154
155
156
157
158
159
160
161
162
163 public Rotate
164 setAxis(String Axis)
165
166 {
167 this.Axis = Axis;
168 return this;
169 }
170
171 public String toString() {
172 return toMessage();
173 }
174
175 public String toHtmlString() {
176 return super.toString() + "[<br/>" +
177
178 "<b>Amount</b> = " +
179 String.valueOf(getAmount()
180 ) +
181 " <br/> " +
182
183 "<b>Axis</b> = " +
184 String.valueOf(getAxis()
185 ) +
186 " <br/> " +
187
188 "<br/>]"
189 ;
190 }
191
192 public String toMessage() {
193 StringBuffer buf = new StringBuffer();
194 buf.append("ROTATE");
195
196 if (Amount != null) {
197 buf.append(" {Amount " + Amount + "}");
198 }
199
200 if (Axis != null) {
201 buf.append(" {Axis " + Axis + "}");
202 }
203
204 return buf.toString();
205 }
206
207
208
209
210
211 }
212