1 2 /** 3 IMPORTANT !!! 4 5 DO NOT EDIT THIS FILE. IT IS GENERATED FROM approriate xml file in xmlresources/gbcommands BY 6 THE JavaClassesGenerator.xslt. MODIFY THAT FILE INSTEAD OF THIS ONE. 7 8 Use Ant task process-gb-messages after that to generate .java files again. 9 10 IMPORTANT END !!! 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 * Representation of the GameBots2004 command DRAWLINES. 15 * 16 * 17 Draws colored staying debug lines in UT2004. Note that these lines may be erased by ALT + G command as well! Drawing works as follows: Two vectors from attribute Vectors are read and line with the specified color is drawn between them, then again two another vectors are read, etc. If there are not enough vectors in the list, line won't be drawn. Color is in RGB format - 0 to 255. ClearAll set to true clears all staying debug lines before drawing (new lines still be drawn if supplied). 18 19 */ 20 public class DrawStayingDebugLines 21 extends CommandMessage 22 { 23 24 25 /** Example how the message looks like - used during parser tests. */ 26 public static final String PROTOTYPE = 27 " {Vectors text} {Color 0,0,0} {ClearAll False} "; 28 29 /** 30 * Creates new instance of command DrawStayingDebugLines. 31 * 32 Draws colored staying debug lines in UT2004. Note that these lines may be erased by ALT + G command as well! Drawing works as follows: Two vectors from attribute Vectors are read and line with the specified color is drawn between them, then again two another vectors are read, etc. If there are not enough vectors in the list, line won't be drawn. Color is in RGB format - 0 to 255. ClearAll set to true clears all staying debug lines before drawing (new lines still be drawn if supplied). 33 34 * Corresponding GameBots message for this command is 35 * DRAWLINES. 36 * 37 * 38 * @param Vectors Attribute holding the vectors for line drawing. Vectors of line points are sent as string. Vectors delimiter is ";" (without quotes), vector X,Y,Z delimiter is "," (without quotes). Example: {Vectors 1000,1000,0;2500,1000,0;3000,1000,0;4000,1000,0}. 39 * @param Color Color in RGB format sent as vector. Ranges from 0 to 255. Default is white. 40 * @param ClearAll If set to true all previous staying debug lines will be erased prior to drawing. 41 */ 42 public DrawStayingDebugLines( 43 String Vectors, Location Color, Boolean ClearAll 44 ) { 45 46 this.Vectors = Vectors; 47 48 this.Color = Color; 49 50 this.ClearAll = ClearAll; 51 52 } 53 54 55 /** 56 * Creates new instance of command DrawStayingDebugLines. 57 * 58 Draws colored staying debug lines in UT2004. Note that these lines may be erased by ALT + G command as well! Drawing works as follows: Two vectors from attribute Vectors are read and line with the specified color is drawn between them, then again two another vectors are read, etc. If there are not enough vectors in the list, line won't be drawn. Color is in RGB format - 0 to 255. ClearAll set to true clears all staying debug lines before drawing (new lines still be drawn if supplied). 59 60 * Corresponding GameBots message for this command is 61 * DRAWLINES. 62 * <p></p> 63 * WARNING: this is empty-command constructor, you have to use setters to fill it up with data that should be sent to GameBots2004! 64 */ 65 public DrawStayingDebugLines() { 66 } 67 68 69 /** 70 * Cloning constructor. 71 * 72 * @param original 73 */ 74 public DrawStayingDebugLines(DrawStayingDebugLines original) { 75 76 this.Vectors = original.Vectors; 77 78 this.Color = original.Color; 79 80 this.ClearAll = original.ClearAll; 81 82 } 83 84 /** 85 Attribute holding the vectors for line drawing. Vectors of line points are sent as string. Vectors delimiter is ";" (without quotes), vector X,Y,Z delimiter is "," (without quotes). Example: {Vectors 1000,1000,0;2500,1000,0;3000,1000,0;4000,1000,0}. 86 */ 87 protected 88 String Vectors = 89 90 null 91 ; 92 93 94 95 /** 96 * Attribute holding the vectors for line drawing. Vectors of line points are sent as string. Vectors delimiter is ";" (without quotes), vector X,Y,Z delimiter is "," (without quotes). Example: {Vectors 1000,1000,0;2500,1000,0;3000,1000,0;4000,1000,0}. 97 */ 98 public String getVectors() 99 100 { 101 return 102 Vectors; 103 } 104 105 106 107 108 /** 109 * Attribute holding the vectors for line drawing. Vectors of line points are sent as string. Vectors delimiter is ";" (without quotes), vector X,Y,Z delimiter is "," (without quotes). Example: {Vectors 1000,1000,0;2500,1000,0;3000,1000,0;4000,1000,0}. 110 */ 111 public DrawStayingDebugLines 112 setVectors(String Vectors) 113 114 { 115 this.Vectors = Vectors; 116 return this; 117 } 118 119 /** 120 Color in RGB format sent as vector. Ranges from 0 to 255. Default is white. 121 */ 122 protected 123 Location Color = 124 125 null 126 ; 127 128 129 130 /** 131 * Color in RGB format sent as vector. Ranges from 0 to 255. Default is white. 132 */ 133 public Location getColor() 134 135 { 136 return 137 Color; 138 } 139 140 141 142 143 /** 144 * Color in RGB format sent as vector. Ranges from 0 to 255. Default is white. 145 */ 146 public DrawStayingDebugLines 147 setColor(Location Color) 148 149 { 150 this.Color = Color; 151 return this; 152 } 153 154 /** 155 If set to true all previous staying debug lines will be erased prior to drawing. 156 */ 157 protected 158 Boolean ClearAll = 159 160 null 161 ; 162 163 164 165 /** 166 * If set to true all previous staying debug lines will be erased prior to drawing. 167 */ 168 public Boolean isClearAll() 169 170 { 171 return 172 ClearAll; 173 } 174 175 176 177 178 /** 179 * If set to true all previous staying debug lines will be erased prior to drawing. 180 */ 181 public DrawStayingDebugLines 182 setClearAll(Boolean ClearAll) 183 184 { 185 this.ClearAll = ClearAll; 186 return this; 187 } 188 189 public String toString() { 190 return toMessage(); 191 } 192 193 public String toHtmlString() { 194 return super.toString() + "[<br/>" + 195 196 "<b>Vectors</b> = " + 197 String.valueOf(getVectors() 198 ) + 199 " <br/> " + 200 201 "<b>Color</b> = " + 202 String.valueOf(getColor() 203 ) + 204 " <br/> " + 205 206 "<b>ClearAll</b> = " + 207 String.valueOf(isClearAll() 208 ) + 209 " <br/> " + 210 211 "<br/>]" 212 ; 213 } 214 215 public String toMessage() { 216 StringBuffer buf = new StringBuffer(); 217 buf.append("DRAWLINES"); 218 219 if (Vectors != null) { 220 buf.append(" {Vectors " + Vectors + "}"); 221 } 222 223 if (Color != null) { 224 buf.append(" {Color " + 225 Color.getX() + "," + 226 Color.getY() + "," + 227 Color.getZ() + "}"); 228 } 229 230 if (ClearAll != null) { 231 buf.append(" {ClearAll " + ClearAll + "}"); 232 } 233 234 return buf.toString(); 235 } 236 237 // --- Extra Java from XML BEGIN (extra/code/java) 238 239 // --- Extra Java from XML END (extra/code/java) 240 241 } 242