|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.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 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 Integer |
Length
Specifies the length of the ray (in UT units). |
static String |
PROTOTYPE
Example how the message looks like - used during parser tests. |
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,
Integer 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. |
Integer |
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(Integer 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 |
---|
public static final String PROTOTYPE
protected String Id
protected javax.vecmath.Vector3d Direction
protected Integer Length
protected Boolean FastTrace
protected Boolean FloorCorrection
protected Boolean TraceActors
Constructor Detail |
---|
public AddRay(String Id, javax.vecmath.Vector3d Direction, Integer Length, Boolean FastTrace, Boolean FloorCorrection, 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 String getId()
public AddRay setId(String Id)
public javax.vecmath.Vector3d getDirection()
public AddRay setDirection(javax.vecmath.Vector3d Direction)
public Integer getLength()
public AddRay setLength(Integer Length)
public Boolean isFastTrace()
public AddRay setFastTrace(Boolean FastTrace)
public Boolean isFloorCorrection()
public AddRay setFloorCorrection(Boolean FloorCorrection)
public Boolean isTraceActors()
public AddRay setTraceActors(Boolean TraceActors)
public String toString()
toString
in class CommandMessage
public String toHtmlString()
public String toMessage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |