cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages
Class IncomingProjectile

Package class diagram package IncomingProjectile
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.udk.communication.messages.GBObjectUpdate
          extended by cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages.IncomingProjectile
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.object.IWorldObject, IGBWorldObjectEvent, cz.cuni.amis.utils.listener.Event

public class IncomingProjectile
extends GBObjectUpdate
implements IGBWorldObjectEvent, cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject

Both asynchronous and synchronous message. Incoming projectile that we can see. Corresponding GameBots message is PRJ.


Nested Class Summary
 
Nested classes/interfaces inherited from interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent
cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent.DestroyWorldObject
 
Field Summary
protected  double DamageRadius
          If the projectile has splash damage, how big it is – in ut units.
protected  javax.vecmath.Vector3d Direction
          Which direction projectile is heading to -> orientation vector.
protected  cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id
          Unique Id of the projectile.
protected  cz.cuni.amis.pogamut.base3d.worldview.object.Location Location
          Current location of the projectile.
protected  cz.cuni.amis.pogamut.base3d.worldview.object.Location Origin
          Possition of the origin, when combined with direction can define the line of fire.
static String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  double Speed
          Current speed of the projectile.
protected  double Time
          Estimated time till impact.
protected  String Type
          The class of the projectile (so you know what is flying against you).
protected  cz.cuni.amis.pogamut.base3d.worldview.object.Velocity Velocity
          Current velocity vector of the projectile.
 
Constructor Summary
IncomingProjectile()
          Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).
IncomingProjectile(IncomingProjectile original)
          Cloning constructor.
IncomingProjectile(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id, double Time, javax.vecmath.Vector3d Direction, cz.cuni.amis.pogamut.base3d.worldview.object.Location Location, cz.cuni.amis.pogamut.base3d.worldview.object.Velocity Velocity, double Speed, cz.cuni.amis.pogamut.base3d.worldview.object.Location Origin, double DamageRadius, String Type)
          Creates new instance of command IncomingProjectile.
 
Method Summary
 boolean equals(Object obj)
           
 double getDamageRadius()
          If the projectile has splash damage, how big it is – in ut units.
 javax.vecmath.Vector3d getDirection()
          Which direction projectile is heading to -> orientation vector.
 cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getId()
          Unique Id of the projectile.
 double getLastSeenTime()
           
 cz.cuni.amis.pogamut.multi.communication.worldview.object.ILocalWorldObject getLocal()
           
 cz.cuni.amis.pogamut.base3d.worldview.object.Location getLocation()
          Current location of the projectile.
 cz.cuni.amis.pogamut.base.communication.worldview.object.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).
 cz.cuni.amis.pogamut.base3d.worldview.object.Location getOrigin()
          Possition of the origin, when combined with direction can define the line of fire.
 cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedWorldObject getShared()
           
 long getSimTime()
           
 double getSpeed()
          Current speed of the projectile.
 cz.cuni.amis.pogamut.multi.communication.worldview.object.IStaticWorldObject getStatic()
           
 double getTime()
          Estimated time till impact.
 String getType()
          The class of the projectile (so you know what is flying against you).
 cz.cuni.amis.pogamut.base3d.worldview.object.Velocity getVelocity()
          Current velocity vector of the projectile.
 int hashCode()
           
protected  void setTime(double time)
           
 String toHtmlString()
           
 String toString()
           
 cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult update(cz.cuni.amis.pogamut.base.communication.worldview.object.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

PROTOTYPE

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

See Also:
Constant Field Values

Id

protected cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id
Unique Id of the projectile.


Time

protected double Time
Estimated time till impact.


Direction

protected javax.vecmath.Vector3d Direction
Which direction projectile is heading to -> orientation vector.


Location

protected cz.cuni.amis.pogamut.base3d.worldview.object.Location Location
Current location of the projectile.


Velocity

protected cz.cuni.amis.pogamut.base3d.worldview.object.Velocity Velocity
Current velocity vector of the projectile.


Speed

protected double Speed
Current speed of the projectile.


Origin

protected cz.cuni.amis.pogamut.base3d.worldview.object.Location Origin
Possition of the origin, when combined with direction can define the line of fire.


DamageRadius

protected double DamageRadius
If the projectile has splash damage, how big it is – in ut units.


Type

protected String Type
The class of the projectile (so you know what is flying against you).

Constructor Detail

IncomingProjectile

public IncomingProjectile(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id,
                          double Time,
                          javax.vecmath.Vector3d Direction,
                          cz.cuni.amis.pogamut.base3d.worldview.object.Location Location,
                          cz.cuni.amis.pogamut.base3d.worldview.object.Velocity Velocity,
                          double Speed,
                          cz.cuni.amis.pogamut.base3d.worldview.object.Location Origin,
                          double DamageRadius,
                          String Type)
Creates new instance of command IncomingProjectile. Both asynchronous and synchronous message. Incoming projectile that we can see. Corresponding GameBots message for this command is .

Parameters:
Id - Unique Id of the projectile.
Time - Estimated time till impact.
Direction - Which direction projectile is heading to -> orientation vector.
Location - Current location of the projectile.
Velocity - Current velocity vector of the projectile.
Speed - Current speed of the projectile.
Origin - Possition of the origin, when combined with direction can define the line of fire.
DamageRadius - If the projectile has splash damage, how big it is – in ut units.
Type - The class of the projectile (so you know what is flying against you).

IncomingProjectile

public IncomingProjectile(IncomingProjectile original)
Cloning constructor.


IncomingProjectile

public IncomingProjectile()
Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).

Method Detail

getId

public cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getId()
Unique Id of the projectile.

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

getTime

public double getTime()
Estimated time till impact.


getDirection

public javax.vecmath.Vector3d getDirection()
Which direction projectile is heading to -> orientation vector.


getLocation

public cz.cuni.amis.pogamut.base3d.worldview.object.Location getLocation()
Current location of the projectile.


getVelocity

public cz.cuni.amis.pogamut.base3d.worldview.object.Velocity getVelocity()
Current velocity vector of the projectile.


getSpeed

public double getSpeed()
Current speed of the projectile.


getOrigin

public cz.cuni.amis.pogamut.base3d.worldview.object.Location getOrigin()
Possition of the origin, when combined with direction can define the line of fire.


getDamageRadius

public double getDamageRadius()
If the projectile has splash damage, how big it is – in ut units.


getType

public String getType()
The class of the projectile (so you know what is flying against you).


setTime

protected void setTime(double time)

getLastSeenTime

public double getLastSeenTime()

getLocal

public cz.cuni.amis.pogamut.multi.communication.worldview.object.ILocalWorldObject getLocal()

getShared

public cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedWorldObject getShared()

getStatic

public cz.cuni.amis.pogamut.multi.communication.worldview.object.IStaticWorldObject getStatic()

getSimTime

public long getSimTime()
Specified by:
getSimTime in interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent
Specified by:
getSimTime in interface cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

update

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

getObject

public cz.cuni.amis.pogamut.base.communication.worldview.object.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).


toString

public String toString()
Overrides:
toString in class cz.cuni.amis.pogamut.base.communication.messages.InfoMessage

toHtmlString

public String toHtmlString()


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