cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages
Class TraceResponse

Package class diagram package TraceResponse
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.TraceResponse
All Implemented Interfaces:
IWorldChangeEvent, IWorldEvent, cz.cuni.amis.utils.listener.Event

public class TraceResponse
extends InfoMessage
implements IWorldEvent, IWorldChangeEvent

Definition of the event TRC.

Complete message documentation: Aynchronous message. Response to TRACE command.


Field Summary
protected  Location From
          Location from which the ray is emitted.
protected  UnrealId HitID
          Id of the thing we have hit.
protected  javax.vecmath.Vector3d HitLocation
          Point of the hit.
protected  javax.vecmath.Vector3d HitNormal
          Normal vector to the trace ray in the point of hit.
protected  String Id
          An Id matching the one sent by client.
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  long SimTime
           
protected  Location To
          Location to which the ray is sent.
protected  boolean TraceActors
          True if we are tracing also actors in the game (players, items).
 
Constructor Summary
TraceResponse()
          Parameter-less contructor for the message.
TraceResponse(String Id, Location From, Location To, boolean Result, javax.vecmath.Vector3d HitNormal, javax.vecmath.Vector3d HitLocation, UnrealId HitID, boolean TraceActors)
          Creates new instance of the message TraceResponse.
TraceResponse(TraceResponse original)
          Cloning constructor from the full message.
 
Method Summary
 Location getFrom()
          Location from which the ray is emitted.
 UnrealId getHitID()
          Id of the thing we have hit.
 javax.vecmath.Vector3d getHitLocation()
          Point of the hit.
 javax.vecmath.Vector3d getHitNormal()
          Normal vector to the trace ray in the point of hit.
 String getId()
          An Id matching the one sent by client.
 long getSimTime()
          Simulation time in MILLI SECONDS !!!
 Location getTo()
          Location to which the ray is sent.
 boolean isResult()
          True if it hit something, false if not.
 boolean isTraceActors()
          True if we are tracing also actors in the game (players, items).
protected  void setSimTime(long SimTime)
          Used by Yylex to slip correct time of the object or programmatically.
 String toHtmlString()
           
 String toJsonLiteral()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROTOTYPE

public static final String PROTOTYPE
Example how the message looks like - used during parser tests.

See Also:
Constant Field Values

SimTime

protected long SimTime

Id

protected String Id
An Id matching the one sent by client. Allows bot to match answer with right query.


From

protected Location From
Location from which the ray is emitted.


To

protected Location To
Location to which the ray is sent.


Result

protected boolean Result
True if it hit something, false if not.


HitNormal

protected javax.vecmath.Vector3d HitNormal
Normal vector to the trace ray in the point of hit.


HitLocation

protected javax.vecmath.Vector3d HitLocation
Point of the hit.


HitID

protected UnrealId HitID
Id of the thing we have hit. May be other player or some item or level geometry.


TraceActors

protected boolean TraceActors
True if we are tracing also actors in the game (players, items). False if we are tracing just level geometry.

Constructor Detail

TraceResponse

public TraceResponse()
Parameter-less contructor for the message.


TraceResponse

public TraceResponse(String Id,
                     Location From,
                     Location To,
                     boolean Result,
                     javax.vecmath.Vector3d HitNormal,
                     javax.vecmath.Vector3d HitLocation,
                     UnrealId HitID,
                     boolean TraceActors)
Creates new instance of the message TraceResponse. Aynchronous message. Response to TRACE command. Corresponding GameBots message is TRC.

Parameters:
Id - An Id matching the one sent by client. Allows bot to match answer with right query.
From - Location from which the ray is emitted.
To - Location to which the ray is sent.
Result - True if it hit something, false if not.
HitNormal - Normal vector to the trace ray in the point of hit.
HitLocation - Point of the hit.
HitID - Id of the thing we have hit. May be other player or some item or level geometry.
TraceActors - True if we are tracing also actors in the game (players, items). False if we are tracing just level geometry.

TraceResponse

public TraceResponse(TraceResponse original)
Cloning constructor from the full message.

Parameters:
original -
Method Detail

getSimTime

public long getSimTime()
Simulation time in MILLI SECONDS !!!

Specified by:
getSimTime in interface IWorldChangeEvent
Specified by:
getSimTime in interface IWorldEvent

setSimTime

protected void setSimTime(long SimTime)
Used by Yylex to slip correct time of the object or programmatically.


getId

public String getId()
An Id matching the one sent by client. Allows bot to match answer with right query.


getFrom

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


getTo

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


isResult

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


getHitNormal

public javax.vecmath.Vector3d getHitNormal()
Normal vector to the trace ray in the point of hit.


getHitLocation

public javax.vecmath.Vector3d getHitLocation()
Point of the hit.


getHitID

public UnrealId getHitID()
Id of the thing we have hit. May be other player or some item or level geometry.


isTraceActors

public boolean isTraceActors()
True if we are tracing also actors in the game (players, items). False if we are tracing just level geometry.


toString

public String toString()
Overrides:
toString in class InfoMessage

toHtmlString

public String toHtmlString()

toJsonLiteral

public String toJsonLiteral()
Overrides:
toJsonLiteral in class InfoMessage


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.