|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.base.communication.messages.CommandMessage cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.AddRay
public class AddRay
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 |
---|
public static final java.lang.String PROTOTYPE
protected java.lang.String Id
protected Vector3d Direction
protected java.lang.Integer Length
protected java.lang.Boolean FastTrace
protected java.lang.Boolean FloorCorrection
protected java.lang.Boolean TraceActors
Constructor Detail |
---|
public AddRay(java.lang.String Id, Vector3d Direction, java.lang.Integer Length, java.lang.Boolean FastTrace, java.lang.Boolean FloorCorrection, java.lang.Boolean TraceActors)
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.public AddRay()
public AddRay(AddRay original)
original
- Method Detail |
---|
public java.lang.String getId()
public AddRay setId(java.lang.String Id)
public Vector3d getDirection()
public AddRay setDirection(Vector3d Direction)
public java.lang.Integer getLength()
public AddRay setLength(java.lang.Integer Length)
public java.lang.Boolean isFastTrace()
public AddRay setFastTrace(java.lang.Boolean FastTrace)
public java.lang.Boolean isFloorCorrection()
public AddRay setFloorCorrection(java.lang.Boolean FloorCorrection)
public java.lang.Boolean isTraceActors()
public AddRay setTraceActors(java.lang.Boolean TraceActors)
public java.lang.String toString()
toString
in class CommandMessage
public java.lang.String toHtmlString()
public java.lang.String toMessage()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |