|
||||||||||
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.InfoMessage cz.cuni.amis.pogamut.udk.communication.messages.GBObjectUpdate cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages.AutoTraceRay
public class AutoTraceRay
Synchronous message. Contains the results of automatically casted rays. One ATR message is for one casted ray. New automatically casted rays can be defined by ADDRAY command and removed by REMOVERAY command. Corresponding GameBots message is ATR.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent |
---|
IWorldObjectUpdatedEvent.DestroyWorldObject |
Field Summary | |
---|---|
protected boolean |
FastTrace
True if it is a fast trace, false if not (fast trace is a bit faster version of UDK ray trace - but provides us with less information - just true/false if we hit something on the way or not). |
protected boolean |
FloorCorrection
If we should correct ray directions accoring floor normal. |
protected Location |
From
Location from which the ray is emitted. |
protected UnrealId |
HitId
Id of the actor we have hit. |
protected Location |
HitLocation
Vector with location of the collision (not sent if FastTrace is True). |
protected javax.vecmath.Vector3d |
HitNormal
Vector with normal of the plane we have hit (not sent if FastTrace is True). |
protected UnrealId |
Id
An Id for this ray (should be unique), assigned by the user when adding ray. |
static String |
PROTOTYPE
Example how the message looks like - used during parser tests. |
protected boolean |
Result
True if it hit something, false if not. |
protected double |
Time
|
protected Location |
To
Location to which the ray is sent. |
protected boolean |
TraceActors
If we traced also actors with this ray (actors – moving things in a game – bots, players, monsters, pickup …) (only if NOT using FastTrace) |
Constructor Summary | |
---|---|
AutoTraceRay()
Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package). |
|
AutoTraceRay(AutoTraceRay original)
Cloning constructor. |
|
AutoTraceRay(UnrealId Id,
Location From,
Location To,
boolean FastTrace,
boolean FloorCorrection,
boolean Result,
javax.vecmath.Vector3d HitNormal,
Location HitLocation,
boolean TraceActors,
UnrealId HitId)
Creates new instance of command AutoTraceRay. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
Location |
getFrom()
Location from which the ray is emitted. |
UnrealId |
getHitId()
Id of the actor we have hit. |
Location |
getHitLocation()
Vector with location of the collision (not sent if FastTrace is True). |
javax.vecmath.Vector3d |
getHitNormal()
Vector with normal of the plane we have hit (not sent if FastTrace is True). |
UnrealId |
getId()
An Id for this ray (should be unique), assigned by the user when adding ray. |
double |
getLastSeenTime()
|
ILocalWorldObject |
getLocal()
|
IWorldObject |
getObject()
Returns original object (if method update() has already been called, for bot-programmer that is always true as the original object is updated and then the event is propagated). |
ISharedWorldObject |
getShared()
|
long |
getSimTime()
|
IStaticWorldObject |
getStatic()
|
protected double |
getTime()
|
Location |
getTo()
Location to which the ray is sent. |
int |
hashCode()
|
boolean |
isFastTrace()
True if it is a fast trace, false if not (fast trace is a bit faster version of UDK ray trace - but provides us with less information - just true/false if we hit something on the way or not). |
boolean |
isFloorCorrection()
If we should correct ray directions accoring floor normal. |
boolean |
isResult()
True if it hit something, false if not. |
boolean |
isTraceActors()
If we traced also actors with this ray (actors – moving things in a game – bots, players, monsters, pickup …) (only if NOT using FastTrace) |
protected void |
setTime(double time)
|
String |
toHtmlString()
|
String |
toString()
|
IWorldObjectUpdateResult |
update(IWorldObject obj)
|
Methods inherited from class cz.cuni.amis.pogamut.base.communication.messages.InfoMessage |
---|
toJsonLiteral |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String PROTOTYPE
protected UnrealId Id
protected Location From
protected Location To
protected boolean FastTrace
protected boolean FloorCorrection
protected boolean Result
protected javax.vecmath.Vector3d HitNormal
protected Location HitLocation
protected boolean TraceActors
protected UnrealId HitId
protected double Time
Constructor Detail |
---|
public AutoTraceRay(UnrealId Id, Location From, Location To, boolean FastTrace, boolean FloorCorrection, boolean Result, javax.vecmath.Vector3d HitNormal, Location HitLocation, boolean TraceActors, UnrealId HitId)
Id
- An Id for this ray (should be unique), assigned by the user
when adding ray.From
- Location from which the ray is emitted.To
- Location to which the ray is sent.FastTrace
- True if it is a fast trace, false if not (fast trace is a
bit faster version of UDK ray trace - but provides us
with less information - just true/false if we hit something
on the way 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.Result
- True if it hit something, false if not.HitNormal
- Vector with normal of the plane we have hit (not sent if
FastTrace is True).HitLocation
- Vector with location of the collision (not sent if FastTrace
is True).TraceActors
- If we traced also actors with this ray (actors – moving
things in a game – bots, players, monsters, pickup …) (only
if NOT using FastTrace)HitId
- Id of the actor we have hit. (Sent if FastTrace is False and
TraceActors is True).public AutoTraceRay(AutoTraceRay original)
public AutoTraceRay()
Method Detail |
---|
public UnrealId getId()
getId
in interface IWorldObjectUpdatedEvent
getId
in interface IWorldObject
public Location getFrom()
public Location getTo()
public boolean isFastTrace()
public boolean isFloorCorrection()
public boolean isResult()
public javax.vecmath.Vector3d getHitNormal()
public Location getHitLocation()
public boolean isTraceActors()
public UnrealId getHitId()
protected double getTime()
protected void setTime(double time)
public double getLastSeenTime()
public ILocalWorldObject getLocal()
public ISharedWorldObject getShared()
public IStaticWorldObject getStatic()
public long getSimTime()
getSimTime
in interface IWorldChangeEvent
getSimTime
in interface IWorldObject
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public IWorldObjectUpdateResult update(IWorldObject obj)
update
in interface IWorldObjectUpdatedEvent
public IWorldObject getObject()
public String toString()
toString
in class InfoMessage
public String toHtmlString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |