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

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.CommandMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.AddRay

public class AddRay
extends CommandMessage

Representation of the GameBots2004 command ADDRAY. Add custom ray for automatic ray tracing. If you send Id = Default, all rays will be erased and default set of rays will be loaded (straight ahead (1,0,0) with 250 length, 45 degrees left (1,–1,0) with 200 length, 45 degrees right (1,1,0) with 200 length). This set of rays is also loaded by default. If you want to change existing ray, just support its Id in ADDRAY command along with new parameters. Direction of the rays work as follows. Bot is looking to x axis, that means if I want ray straight ahead I specify some vector on positive x axis (vectors in unreal are specified by (x,y,z) so it would look like this (1,0,0) or this (123,0,0) – numbers doesn't matter, its about direction - vectors will be normalized). If I want ray behind it would be (–1,0,0). 90 degrees right (0,1,0) etc.


Field Summary
protected  Vector3d Direction
          Vector direction of the ray (it will be relative - added to the vector, where the bot is looking, also takes into account angle of the floor the bot is standing on).
protected  java.lang.Boolean FastTrace
          True if we want to use FastTrace function instead of Trace function (a bit faster but less information provided - just information if we hit something or not).
protected  java.lang.Boolean FloorCorrection
          If we should correct ray directions accoring floor normal.
protected  java.lang.String Id
          User set Id of the ray, so the ray can be identified.
protected  java.lang.Integer Length
          Specifies the length of the ray (in UT units).
static java.lang.String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  java.lang.Boolean TraceActors
          If we want to trace also actors – bots, monsters, players, items.
 
Constructor Summary
AddRay()
          Creates new instance of command AddRay.
AddRay(AddRay original)
          Cloning constructor.
AddRay(java.lang.String Id, Vector3d Direction, java.lang.Integer Length, java.lang.Boolean FastTrace, java.lang.Boolean FloorCorrection, java.lang.Boolean TraceActors)
          Creates new instance of command AddRay.
 
Method Summary
 Vector3d getDirection()
          Vector direction of the ray (it will be relative - added to the vector, where the bot is looking, also takes into account angle of the floor the bot is standing on).
 java.lang.String getId()
          User set Id of the ray, so the ray can be identified.
 java.lang.Integer getLength()
          Specifies the length of the ray (in UT units).
 java.lang.Boolean isFastTrace()
          True if we want to use FastTrace function instead of Trace function (a bit faster but less information provided - just information if we hit something or not).
 java.lang.Boolean isFloorCorrection()
          If we should correct ray directions accoring floor normal.
 java.lang.Boolean isTraceActors()
          If we want to trace also actors – bots, monsters, players, items.
 AddRay setDirection(Vector3d Direction)
          Vector direction of the ray (it will be relative - added to the vector, where the bot is looking, also takes into account angle of the floor the bot is standing on).
 AddRay setFastTrace(java.lang.Boolean FastTrace)
          True if we want to use FastTrace function instead of Trace function (a bit faster but less information provided - just information if we hit something or not).
 AddRay setFloorCorrection(java.lang.Boolean FloorCorrection)
          If we should correct ray directions accoring floor normal.
 AddRay setId(java.lang.String Id)
          User set Id of the ray, so the ray can be identified.
 AddRay setLength(java.lang.Integer Length)
          Specifies the length of the ray (in UT units).
 AddRay setTraceActors(java.lang.Boolean TraceActors)
          If we want to trace also actors – bots, monsters, players, items.
 java.lang.String toHtmlString()
           
 java.lang.String toMessage()
           
 java.lang.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 java.lang.String PROTOTYPE
Example how the message looks like - used during parser tests.

See Also:
Constant Field Values

Id

protected java.lang.String Id
User set Id of the ray, so the ray can be identified.


Direction

protected Vector3d Direction
Vector direction of the ray (it will be relative - added to the vector, where the bot is looking, also takes into account angle of the floor the bot is standing on).


Length

protected java.lang.Integer Length
Specifies the length of the ray (in UT units).


FastTrace

protected java.lang.Boolean FastTrace
True if we want to use FastTrace function instead of Trace function (a bit faster but less information provided - just information if we hit something or not).


FloorCorrection

protected java.lang.Boolean FloorCorrection
If we should correct ray directions accoring floor normal. Note: Has issue - we can't set set rays up or down when correction is active.


TraceActors

protected java.lang.Boolean TraceActors
If we want to trace also actors – bots, monsters, players, items. False if we want to trace just level geometry.

Constructor Detail

AddRay

public AddRay(java.lang.String Id,
              Vector3d Direction,
              java.lang.Integer Length,
              java.lang.Boolean FastTrace,
              java.lang.Boolean FloorCorrection,
              java.lang.Boolean TraceActors)
Creates new instance of command AddRay. Add custom ray for automatic ray tracing. If you send Id = Default, all rays will be erased and default set of rays will be loaded (straight ahead (1,0,0) with 250 length, 45 degrees left (1,–1,0) with 200 length, 45 degrees right (1,1,0) with 200 length). This set of rays is also loaded by default. If you want to change existing ray, just support its Id in ADDRAY command along with new parameters. Direction of the rays work as follows. Bot is looking to x axis, that means if I want ray straight ahead I specify some vector on positive x axis (vectors in unreal are specified by (x,y,z) so it would look like this (1,0,0) or this (123,0,0) – numbers doesn't matter, its about direction - vectors will be normalized). If I want ray behind it would be (–1,0,0). 90 degrees right (0,1,0) etc. Corresponding GameBots message for this command is ADDRAY.

Parameters:
Id - User set Id of the ray, so the ray can be identified.
Direction - Vector direction of the ray (it will be relative - added to the vector, where the bot is looking, also takes into account angle of the floor the bot is standing on).
Length - Specifies the length of the ray (in UT units).
FastTrace - True if we want to use FastTrace function instead of Trace function (a bit faster but less information provided - just information if we hit something or not).
FloorCorrection - If we should correct ray directions accoring floor normal. Note: Has issue - we can't set set rays up or down when correction is active.
TraceActors - If we want to trace also actors – bots, monsters, players, items. False if we want to trace just level geometry.

AddRay

public AddRay()
Creates new instance of command AddRay. Add custom ray for automatic ray tracing. If you send Id = Default, all rays will be erased and default set of rays will be loaded (straight ahead (1,0,0) with 250 length, 45 degrees left (1,–1,0) with 200 length, 45 degrees right (1,1,0) with 200 length). This set of rays is also loaded by default. If you want to change existing ray, just support its Id in ADDRAY command along with new parameters. Direction of the rays work as follows. Bot is looking to x axis, that means if I want ray straight ahead I specify some vector on positive x axis (vectors in unreal are specified by (x,y,z) so it would look like this (1,0,0) or this (123,0,0) – numbers doesn't matter, its about direction - vectors will be normalized). If I want ray behind it would be (–1,0,0). 90 degrees right (0,1,0) etc. Corresponding GameBots message for this command is ADDRAY.

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


AddRay

public AddRay(AddRay original)
Cloning constructor.

Parameters:
original -
Method Detail

getId

public java.lang.String getId()
User set Id of the ray, so the ray can be identified.


setId

public AddRay setId(java.lang.String Id)
User set Id of the ray, so the ray can be identified.


getDirection

public Vector3d getDirection()
Vector direction of the ray (it will be relative - added to the vector, where the bot is looking, also takes into account angle of the floor the bot is standing on).


setDirection

public AddRay setDirection(Vector3d Direction)
Vector direction of the ray (it will be relative - added to the vector, where the bot is looking, also takes into account angle of the floor the bot is standing on).


getLength

public java.lang.Integer getLength()
Specifies the length of the ray (in UT units).


setLength

public AddRay setLength(java.lang.Integer Length)
Specifies the length of the ray (in UT units).


isFastTrace

public java.lang.Boolean isFastTrace()
True if we want to use FastTrace function instead of Trace function (a bit faster but less information provided - just information if we hit something or not).


setFastTrace

public AddRay setFastTrace(java.lang.Boolean FastTrace)
True if we want to use FastTrace function instead of Trace function (a bit faster but less information provided - just information if we hit something or not).


isFloorCorrection

public java.lang.Boolean isFloorCorrection()
If we should correct ray directions accoring floor normal. Note: Has issue - we can't set set rays up or down when correction is active.


setFloorCorrection

public AddRay setFloorCorrection(java.lang.Boolean FloorCorrection)
If we should correct ray directions accoring floor normal. Note: Has issue - we can't set set rays up or down when correction is active.


isTraceActors

public java.lang.Boolean isTraceActors()
If we want to trace also actors – bots, monsters, players, items. False if we want to trace just level geometry.


setTraceActors

public AddRay setTraceActors(java.lang.Boolean TraceActors)
If we want to trace also actors – bots, monsters, players, items. False if we want to trace just level geometry.


toString

public java.lang.String toString()
Overrides:
toString in class CommandMessage

toHtmlString

public java.lang.String toHtmlString()

toMessage

public java.lang.String toMessage()