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

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

public class AddRay
extends CommandMessage

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 command is ADDRAY.


Field Summary
protected  javax.vecmath.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  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  boolean FloorCorrection
          If we should correct ray directions accoring floor normal.
protected  String Id
          User set Id of the ray, so the ray can be identified.
protected  int Length
          Specifies the length of the ray (in UT units).
protected  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(String Id, javax.vecmath.Vector3d Direction, int Length, boolean FastTrace, boolean FloorCorrection, boolean TraceActors)
          Creates new instance of command AddRay.
 
Method Summary
 javax.vecmath.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).
 String getId()
          User set Id of the ray, so the ray can be identified.
 int getLength()
          Specifies the length of the ray (in UT units).
 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).
 boolean isFloorCorrection()
          If we should correct ray directions accoring floor normal.
 boolean isTraceActors()
          If we want to trace also actors – bots, monsters, players, items.
 AddRay setDirection(javax.vecmath.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(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(boolean FloorCorrection)
          If we should correct ray directions accoring floor normal.
 AddRay setId(String Id)
          User set Id of the ray, so the ray can be identified.
 AddRay setLength(int Length)
          Specifies the length of the ray (in UT units).
 AddRay setTraceActors(boolean TraceActors)
          If we want to trace also actors – bots, monsters, players, items.
 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

Id

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


Direction

protected javax.vecmath.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 int Length
Specifies the length of the ray (in UT units).


FastTrace

protected 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 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 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(String Id,
              javax.vecmath.Vector3d Direction,
              int Length,
              boolean FastTrace,
              boolean FloorCorrection,
              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!


AddRay

public AddRay(AddRay original)
Cloning constructor.

Method Detail

getId

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


setId

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


getDirection

public javax.vecmath.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(javax.vecmath.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 int getLength()
Specifies the length of the ray (in UT units).


setLength

public AddRay setLength(int Length)
Specifies the length of the ray (in UT units).


isFastTrace

public 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(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 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(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 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(boolean TraceActors)
If we want to trace also actors – bots, monsters, players, items. False if we want to trace just level geometry.


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.