cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages
Class AutoTraceRayMessage.AutoTraceRayLocalMessage

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.AutoTraceRayLocal
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.AutoTraceRayMessage.AutoTraceRayLocalMessage
All Implemented Interfaces:
IWorldObject, ILocalWorldObject, java.lang.Cloneable
Enclosing class:
AutoTraceRayMessage

public class AutoTraceRayMessage.AutoTraceRayLocalMessage
extends AutoTraceRayLocal

Implementation of the local part of the GameBots2004 message ATR, used to facade ATRMessage.

Complete message documentation: 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.


Field Summary
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.AutoTraceRayLocal
SimTime
 
Constructor Summary
AutoTraceRayMessage.AutoTraceRayLocalMessage()
           
 
Method Summary
 AutoTraceRayMessage.AutoTraceRayLocalMessage clone()
           
 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).
 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.
 AutoTraceRayMessage.AutoTraceRayLocalMessage getLocal()
           
 ISharedWorldObject getShared()
           
 IStaticWorldObject getStatic()
           
 Location getTo()
          Location to which the ray is sent.
 boolean isFastTrace()
          True if it is a fast trace, false if not (fast trace is a bit faster version of UT2004 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)
 java.lang.String toHtmlString()
           
 java.lang.String toString()
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.AutoTraceRayLocal
getCompositeClass, getSimTime, setSimTime
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AutoTraceRayMessage.AutoTraceRayLocalMessage

public AutoTraceRayMessage.AutoTraceRayLocalMessage()
Method Detail

clone

public AutoTraceRayMessage.AutoTraceRayLocalMessage clone()
Specified by:
clone in interface ILocalWorldObject
Specified by:
clone in class AutoTraceRayLocal

getLocal

public AutoTraceRayMessage.AutoTraceRayLocalMessage getLocal()
Overrides:
getLocal in class AutoTraceRayLocal

getShared

public ISharedWorldObject getShared()
Overrides:
getShared in class AutoTraceRayLocal

getStatic

public IStaticWorldObject getStatic()
Overrides:
getStatic in class AutoTraceRayLocal

getId

public UnrealId getId()
An Id for this ray (should be unique), assigned by the user when adding ray.

Specified by:
getId in interface IWorldObject
Specified by:
getId in class AutoTraceRayLocal
Returns:

getFrom

public Location getFrom()
Location from which the ray is emitted.

Specified by:
getFrom in class AutoTraceRayLocal

getTo

public Location getTo()
Location to which the ray is sent.

Specified by:
getTo in class AutoTraceRayLocal

isFastTrace

public boolean isFastTrace()
True if it is a fast trace, false if not (fast trace is a bit faster version of UT2004 ray trace - but provides us with less information - just true/false if we hit something on the way or not).

Specified by:
isFastTrace in class AutoTraceRayLocal

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.

Specified by:
isFloorCorrection in class AutoTraceRayLocal

isResult

public boolean isResult()
True if it hit something, false if not.

Specified by:
isResult in class AutoTraceRayLocal

getHitNormal

public Vector3d getHitNormal()
Vector with normal of the plane we have hit (not sent if FastTrace is True).

Specified by:
getHitNormal in class AutoTraceRayLocal

getHitLocation

public Location getHitLocation()
Vector with location of the collision (not sent if FastTrace is True).

Specified by:
getHitLocation in class AutoTraceRayLocal

isTraceActors

public 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)

Specified by:
isTraceActors in class AutoTraceRayLocal

getHitId

public UnrealId getHitId()
Id of the actor we have hit. (Sent if FastTrace is False and TraceActors is True).

Specified by:
getHitId in class AutoTraceRayLocal

toString

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

toHtmlString

public java.lang.String toHtmlString()
Overrides:
toHtmlString in class AutoTraceRayLocal