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

Package class diagram package AutoTraceRayMessage
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.AutoTraceRay
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.AutoTraceRayMessage
All Implemented Interfaces:
cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent, cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent, cz.cuni.amis.pogamut.base.communication.worldview.event.IWorldEvent, cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject, cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent, cz.cuni.amis.pogamut.multi.communication.worldview.object.ICompositeWorldObject, cz.cuni.amis.utils.listener.Event

public class AutoTraceRayMessage
extends AutoTraceRay
implements cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent, cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent

Implementation of the GameBots2004 message ATR contains also its Local/Shared/Static subpart class definitions..

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.


Nested Class Summary
 class AutoTraceRayMessage.AutoTraceRayLocalMessage
          Implementation of the local part of the GameBots2004 message ATR, used to facade ATRMessage.
 class AutoTraceRayMessage.AutoTraceRaySharedMessage
          Implementation of the shared part of the GameBots2004 message ATR, used to facade ATRMessage.
 class AutoTraceRayMessage.AutoTraceRayStaticMessage
          Implementation of the static part of the GameBots2004 message ATR, used to facade ATRMessage.
 
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.AutoTraceRay
AutoTraceRay.AutoTraceRayUpdate
 
Field Summary
protected  boolean FastTrace
          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).
protected  boolean FastTrace_Set
          Whether property 'FastTrace' was received from GB2004.
protected  boolean FloorCorrection
          If we should correct ray directions accoring floor normal.
protected  boolean FloorCorrection_Set
          Whether property 'FloorCorrection' was received from GB2004.
protected  cz.cuni.amis.pogamut.base3d.worldview.object.Location From
          Location from which the ray is emitted.
protected  boolean From_Set
          Whether property 'From' was received from GB2004.
protected  cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId HitId
          Id of the actor we have hit.
protected  boolean HitId_Set
          Whether property 'HitId' was received from GB2004.
protected  cz.cuni.amis.pogamut.base3d.worldview.object.Location HitLocation
          Vector with location of the collision (not sent if FastTrace is True).
protected  boolean HitLocation_Set
          Whether property 'HitLocation' was received from GB2004.
protected  javax.vecmath.Vector3d HitNormal
          Vector with normal of the plane we have hit (not sent if FastTrace is True).
protected  boolean HitNormal_Set
          Whether property 'HitNormal' was received from GB2004.
protected  cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id
          An Id for this ray (should be unique), assigned by the user when adding ray.
protected  boolean Id_Set
          Whether property 'Id' was received from GB2004.
protected  boolean Result
          True if it hit something, false if not.
protected  boolean Result_Set
          Whether property 'Result' was received from GB2004.
protected  cz.cuni.amis.pogamut.multi.agent.ITeamId TeamId
           
protected  cz.cuni.amis.pogamut.base3d.worldview.object.Location To
          Location to which the ray is sent.
protected  boolean To_Set
          Whether property 'To' was received from GB2004.
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)
protected  boolean TraceActors_Set
          Whether property 'TraceActors' was received from GB2004.
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.AutoTraceRay
PROTOTYPE, SimTime
 
Constructor Summary
AutoTraceRayMessage()
          Parameter-less contructor for the message.
AutoTraceRayMessage(AutoTraceRayMessage original)
          Cloning constructor from the full message.
AutoTraceRayMessage(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id, cz.cuni.amis.pogamut.base3d.worldview.object.Location From, cz.cuni.amis.pogamut.base3d.worldview.object.Location To, boolean FastTrace, boolean FloorCorrection, boolean Result, javax.vecmath.Vector3d HitNormal, cz.cuni.amis.pogamut.base3d.worldview.object.Location HitLocation, boolean TraceActors, cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId HitId)
          Creates new instance of the message AutoTraceRay.
 
Method Summary
 cz.cuni.amis.pogamut.base3d.worldview.object.Location getFrom()
          Location from which the ray is emitted.
 cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getHitId()
          Id of the actor we have hit.
 cz.cuni.amis.pogamut.base3d.worldview.object.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).
 cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getId()
          An Id for this ray (should be unique), assigned by the user when adding ray.
 AutoTraceRayLocal getLocal()
           
 cz.cuni.amis.pogamut.multi.communication.translator.event.ILocalWorldObjectUpdatedEvent getLocalEvent()
           
 AutoTraceRayShared getShared()
           
 cz.cuni.amis.pogamut.multi.communication.translator.event.ISharedWorldObjectUpdatedEvent getSharedEvent()
           
 AutoTraceRayStatic getStatic()
           
 cz.cuni.amis.pogamut.multi.communication.translator.event.IStaticWorldObjectUpdatedEvent getStaticEvent()
           
 cz.cuni.amis.pogamut.multi.agent.ITeamId getTeamId()
           
 cz.cuni.amis.pogamut.base3d.worldview.object.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)
protected  void setTeamId(cz.cuni.amis.pogamut.multi.agent.ITeamId TeamId)
          Used by Yylex to slip corretn TeamId.
 String toHtmlString()
           
 String toString()
           
 cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult<cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject> update(cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject object)
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.AutoTraceRay
getSimTime, setSimTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent
getSimTime
 

Field Detail

TeamId

protected cz.cuni.amis.pogamut.multi.agent.ITeamId TeamId

Id

protected cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id
An Id for this ray (should be unique), assigned by the user when adding ray.


Id_Set

protected boolean Id_Set
Whether property 'Id' was received from GB2004.


From

protected cz.cuni.amis.pogamut.base3d.worldview.object.Location From
Location from which the ray is emitted.


From_Set

protected boolean From_Set
Whether property 'From' was received from GB2004.


To

protected cz.cuni.amis.pogamut.base3d.worldview.object.Location To
Location to which the ray is sent.


To_Set

protected boolean To_Set
Whether property 'To' was received from GB2004.


FastTrace

protected boolean FastTrace
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).


FastTrace_Set

protected boolean FastTrace_Set
Whether property 'FastTrace' was received from GB2004.


FloorCorrection

protected boolean 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.


FloorCorrection_Set

protected boolean FloorCorrection_Set
Whether property 'FloorCorrection' was received from GB2004.


Result

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


Result_Set

protected boolean Result_Set
Whether property 'Result' was received from GB2004.


HitNormal

protected javax.vecmath.Vector3d HitNormal
Vector with normal of the plane we have hit (not sent if FastTrace is True).


HitNormal_Set

protected boolean HitNormal_Set
Whether property 'HitNormal' was received from GB2004.


HitLocation

protected cz.cuni.amis.pogamut.base3d.worldview.object.Location HitLocation
Vector with location of the collision (not sent if FastTrace is True).


HitLocation_Set

protected boolean HitLocation_Set
Whether property 'HitLocation' was received from GB2004.


TraceActors

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)


TraceActors_Set

protected boolean TraceActors_Set
Whether property 'TraceActors' was received from GB2004.


HitId

protected cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId HitId
Id of the actor we have hit. (Sent if FastTrace is False and TraceActors is True).


HitId_Set

protected boolean HitId_Set
Whether property 'HitId' was received from GB2004.

Constructor Detail

AutoTraceRayMessage

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


AutoTraceRayMessage

public AutoTraceRayMessage(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id,
                           cz.cuni.amis.pogamut.base3d.worldview.object.Location From,
                           cz.cuni.amis.pogamut.base3d.worldview.object.Location To,
                           boolean FastTrace,
                           boolean FloorCorrection,
                           boolean Result,
                           javax.vecmath.Vector3d HitNormal,
                           cz.cuni.amis.pogamut.base3d.worldview.object.Location HitLocation,
                           boolean TraceActors,
                           cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId HitId)
Creates new instance of the message 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.

Parameters:
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 UT2004 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).

AutoTraceRayMessage

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

Parameters:
original -
Method Detail

setTeamId

protected void setTeamId(cz.cuni.amis.pogamut.multi.agent.ITeamId TeamId)
Used by Yylex to slip corretn TeamId.


getTeamId

public cz.cuni.amis.pogamut.multi.agent.ITeamId getTeamId()

getId

public cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getId()
Description copied from class: AutoTraceRay
An Id for this ray (should be unique), assigned by the user when adding ray.

Specified by:
getId in interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent
Specified by:
getId in interface cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject
Specified by:
getId in interface cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent
Specified by:
getId in class AutoTraceRay

getFrom

public cz.cuni.amis.pogamut.base3d.worldview.object.Location getFrom()
Description copied from class: AutoTraceRay
Location from which the ray is emitted.

Specified by:
getFrom in class AutoTraceRay

getTo

public cz.cuni.amis.pogamut.base3d.worldview.object.Location getTo()
Description copied from class: AutoTraceRay
Location to which the ray is sent.

Specified by:
getTo in class AutoTraceRay

isFastTrace

public boolean isFastTrace()
Description copied from class: AutoTraceRay
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 AutoTraceRay

isFloorCorrection

public boolean isFloorCorrection()
Description copied from class: AutoTraceRay
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 AutoTraceRay

isResult

public boolean isResult()
Description copied from class: AutoTraceRay
True if it hit something, false if not.

Specified by:
isResult in class AutoTraceRay

getHitNormal

public javax.vecmath.Vector3d getHitNormal()
Description copied from class: AutoTraceRay
Vector with normal of the plane we have hit (not sent if FastTrace is True).

Specified by:
getHitNormal in class AutoTraceRay

getHitLocation

public cz.cuni.amis.pogamut.base3d.worldview.object.Location getHitLocation()
Description copied from class: AutoTraceRay
Vector with location of the collision (not sent if FastTrace is True).

Specified by:
getHitLocation in class AutoTraceRay

isTraceActors

public boolean isTraceActors()
Description copied from class: AutoTraceRay
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 AutoTraceRay

getHitId

public cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getHitId()
Description copied from class: AutoTraceRay
Id of the actor we have hit. (Sent if FastTrace is False and TraceActors is True).

Specified by:
getHitId in class AutoTraceRay

getLocal

public AutoTraceRayLocal getLocal()
Specified by:
getLocal in interface cz.cuni.amis.pogamut.multi.communication.worldview.object.ICompositeWorldObject

getShared

public AutoTraceRayShared getShared()
Specified by:
getShared in interface cz.cuni.amis.pogamut.multi.communication.worldview.object.ICompositeWorldObject

getStatic

public AutoTraceRayStatic getStatic()
Specified by:
getStatic in interface cz.cuni.amis.pogamut.multi.communication.worldview.object.ICompositeWorldObject

update

public cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult<cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject> update(cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject object)
Specified by:
update in interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent

getLocalEvent

public cz.cuni.amis.pogamut.multi.communication.translator.event.ILocalWorldObjectUpdatedEvent getLocalEvent()
Specified by:
getLocalEvent in interface cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent

getSharedEvent

public cz.cuni.amis.pogamut.multi.communication.translator.event.ISharedWorldObjectUpdatedEvent getSharedEvent()
Specified by:
getSharedEvent in interface cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent

getStaticEvent

public cz.cuni.amis.pogamut.multi.communication.translator.event.IStaticWorldObjectUpdatedEvent getStaticEvent()
Specified by:
getStaticEvent in interface cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent

toString

public String toString()
Overrides:
toString in class AutoTraceRay

toHtmlString

public String toHtmlString()
Overrides:
toHtmlString in class AutoTraceRay


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