cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands
Class DrawStayingDebugLines

Package class diagram package DrawStayingDebugLines
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.CommandMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.DrawStayingDebugLines

public class DrawStayingDebugLines
extends CommandMessage

Representation of the GameBots2004 command DRAWLINES. 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).


Field Summary
protected  Boolean ClearAll
          If set to true all previous staying debug lines will be erased prior to drawing.
protected  Location Color
          Color in RGB format sent as vector.
static String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  String Vectors
          Attribute holding the vectors for line drawing.
 
Constructor Summary
DrawStayingDebugLines()
          Creates new instance of command DrawStayingDebugLines.
DrawStayingDebugLines(DrawStayingDebugLines original)
          Cloning constructor.
DrawStayingDebugLines(String Vectors, Location Color, Boolean ClearAll)
          Creates new instance of command DrawStayingDebugLines.
 
Method Summary
 Location getColor()
          Color in RGB format sent as vector.
 String getVectors()
          Attribute holding the vectors for line drawing.
 Boolean isClearAll()
          If set to true all previous staying debug lines will be erased prior to drawing.
 DrawStayingDebugLines setClearAll(Boolean ClearAll)
          If set to true all previous staying debug lines will be erased prior to drawing.
 DrawStayingDebugLines setColor(Location Color)
          Color in RGB format sent as vector.
 DrawStayingDebugLines setVectors(String Vectors)
          Attribute holding the vectors for line drawing.
 String toHtmlString()
           
 String toMessage()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROTOTYPE

public static final String PROTOTYPE
Example how the message looks like - used during parser tests.

See Also:
Constant Field Values

Vectors

protected String 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}.


Color

protected Location Color
Color in RGB format sent as vector. Ranges from 0 to 255. Default is white.


ClearAll

protected Boolean ClearAll
If set to true all previous staying debug lines will be erased prior to drawing.

Constructor Detail

DrawStayingDebugLines

public DrawStayingDebugLines(String Vectors,
                             Location Color,
                             Boolean ClearAll)
Creates new instance of command DrawStayingDebugLines. 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). Corresponding GameBots message for this command is DRAWLINES.

Parameters:
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}.
Color - Color in RGB format sent as vector. Ranges from 0 to 255. Default is white.
ClearAll - If set to true all previous staying debug lines will be erased prior to drawing.

DrawStayingDebugLines

public DrawStayingDebugLines()
Creates new instance of command DrawStayingDebugLines. 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). Corresponding GameBots message for this command is DRAWLINES.

WARNING: this is empty-command constructor, you have to use setters to fill it up with data that should be sent to GameBots2004!


DrawStayingDebugLines

public DrawStayingDebugLines(DrawStayingDebugLines original)
Cloning constructor.

Parameters:
original -
Method Detail

getVectors

public String getVectors()
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}.


setVectors

public DrawStayingDebugLines setVectors(String 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}.


getColor

public Location getColor()
Color in RGB format sent as vector. Ranges from 0 to 255. Default is white.


setColor

public DrawStayingDebugLines setColor(Location Color)
Color in RGB format sent as vector. Ranges from 0 to 255. Default is white.


isClearAll

public Boolean isClearAll()
If set to true all previous staying debug lines will be erased prior to drawing.


setClearAll

public DrawStayingDebugLines setClearAll(Boolean ClearAll)
If set to true all previous staying debug lines will be erased prior to drawing.


toString

public String toString()
Overrides:
toString in class CommandMessage

toHtmlString

public String toHtmlString()

toMessage

public String toMessage()


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.