View Javadoc

1   
2               /**
3               IMPORTANT !!!
4   
5               DO NOT EDIT THIS FILE. IT IS GENERATED FROM approriate xml file in xmlresources/gbinfomessages BY
6               THE JavaClassesGenerator.xslt. MODIFY THESE FILES INSTEAD OF THIS ONE.
7   
8               IMPORTANT END !!!
9               */
10              package
11              cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages;
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  		Asynchronous message. We have collided with a wall. Note it is
35  		common to get a bunch of these when you try to run through a
36  		wall or are pushed into one by gunfire or something.
37  	
38                            Corresponding GameBots message is
39                            WAL.
40                        
41               */
42              
43              public class
44              WallCollision
45                      extends GBEvent
46                  
47  	            	implements IWorldEvent, IWorldChangeEvent
48  
49              {
50              
51              /**
52                Creates new instance of command WallCollision.
53                
54  		Asynchronous message. We have collided with a wall. Note it is
55  		common to get a bunch of these when you try to run through a
56  		wall or are pushed into one by gunfire or something.
57  	Corresponding GameBots message for this command is
58                .
59                    @param Id 
60  			Id of the wall we have hit (level geometry).
61  		
62                    @param Normal 
63  			Normal of the wall bot collided with.
64  		
65                    @param Location 
66  			Absolute location of bot at the time of impact.
67  		
68                */
69               public WallCollision(
70                  String Id,  Vector3d Normal,  Location Location) {
71                      
72                      this.Id = Id;
73                  
74                      this.Normal = Normal;
75                  
76                      this.Location = Location;
77                  
78                  }
79  
80              
81      	/** Example how the message looks like - used during parser tests. */
82      	public static final String PROTOTYPE =
83      		"WAL {Id text} {Normal 0,0,0} {Location 0,0,0}";
84      
85  
86              /////// Properties BEGIN
87              
88          /**
89          
90  			Id of the wall we have hit (level geometry).
91  		 */
92          protected
93           String Id =
94          	null;
95  
96          
97          /**
98          
99  			Id of the wall we have hit (level geometry).
100 		 */
101         public
102         String getId() {
103             return
104          Id;
105         }
106         
107 
108         
109         /**
110         
111 			Normal of the wall bot collided with.
112 		 */
113         protected
114          Vector3d Normal =
115         	null;
116 
117         
118         /**
119         
120 			Normal of the wall bot collided with.
121 		 */
122         public
123         Vector3d getNormal() {
124             return
125          Normal;
126         }
127         
128 
129         
130         /**
131         
132 			Absolute location of bot at the time of impact.
133 		 */
134         protected
135          Location Location =
136         	null;
137 
138         
139         /**
140         
141 			Absolute location of bot at the time of impact.
142 		 */
143         public
144         Location getLocation() {
145             return
146          Location;
147         }
148         
149 
150         
151             /////// Properties END
152 
153             /////// Extra Java code BEGIN
154 
155             	/////// Additional code from xslt BEGIN
156             		
157        					public long getSimTime() {
158        						// NOT IMPLEMENTED FOR UDK
159        						return 0;
160        					}
161             		
162 
163 
164             	/////// Additional code from xslt END
165 
166 	            /////// Extra Java from XML BEGIN
167             		
168             	/////// Extra Java from XML END
169 
170             /////// Extra Java code END
171 
172             
173 
174             /**
175               * Cloning constructor.
176               */
177              public WallCollision(WallCollision original) {
178                 
179                      this.Id=original.Id;
180                 
181                      this.Normal=original.Normal;
182                 
183                      this.Location=original.Location;
184                 
185              }
186 
187              
188                  /**
189                   * Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).
190                   */
191 	             public WallCollision() {
192 	             }
193              
194 
195                  
196             public String toString() {
197                 return
198                 
199                 		super.toString() + " | " +
200                 		
201 				               "Id = " +
202 				               String.valueOf(Id) + " | " +
203 				            
204 				               "Normal = " +
205 				               String.valueOf(Normal) + " | " +
206 				            
207 				               "Location = " +
208 				               String.valueOf(Location) + " | " +
209 				             "";
210                 	
211              }
212 
213              public String toHtmlString() {
214                 return super.toString() +
215             
216             "<b>Id</b> : " +
217             String.valueOf(Id) +
218             " <br/> " +
219             
220             "<b>Normal</b> : " +
221             String.valueOf(Normal) +
222             " <br/> " +
223             
224             "<b>Location</b> : " +
225             String.valueOf(Location) +
226             " <br/> " +
227              "";
228              }
229 
230              
231              
232              }
233 
234