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

Package class diagram package EntityMessage
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Entity
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.EntityMessage
All Implemented Interfaces:
IWorldChangeEvent, IWorldObjectUpdatedEvent, IWorldEvent, IWorldObject, ILocated, IViewable, ICompositeWorldObjectUpdatedEvent, ICompositeWorldObject, IGBViewable, cz.cuni.amis.utils.listener.Event

public class EntityMessage
extends Entity
implements IWorldObjectUpdatedEvent, ICompositeWorldObjectUpdatedEvent

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

Complete message documentation: Generic physical entity that may be present in the world. Works as a hook for custom objects, such as new items from EmohawkRPG extension.


Nested Class Summary
 class EntityMessage.EntityLocalMessage
          Implementation of the local part of the GameBots2004 message ENT, used to facade ENTMessage.
 class EntityMessage.EntitySharedMessage
          Implementation of the shared part of the GameBots2004 message ENT, used to facade ENTMessage.
 class EntityMessage.EntityStaticMessage
          Implementation of the static part of the GameBots2004 message ENT, used to facade ENTMessage.
 
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Entity
Entity.EntityUpdate, Entity.ObjectDisappeared
 
Nested classes/interfaces inherited from interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent
IWorldObjectUpdatedEvent.DestroyWorldObject
 
Field Summary
protected  String EntityClass
          Type (category) of the entity.
protected  boolean EntityClass_Set
          Whether property 'EntityClass' was received from GB2004.
protected  UnrealId Id
          Unique Id of the item.
protected  boolean Id_Set
          Whether property 'Id' was received from GB2004.
protected  Location Location
          Location of the item.
protected  boolean Location_Set
          Whether property 'Location' was received from GB2004.
protected  Rotation Rotation
          Rotation of the item.
protected  boolean Rotation_Set
          Whether property 'Rotation' was received from GB2004.
protected  ITeamId TeamId
           
protected  String Type
          Type (category) of the entity.
protected  boolean Type_Set
          Whether property 'Type' was received from GB2004.
protected  Velocity Velocity
          Velocity of the item.
protected  boolean Velocity_Set
          Whether property 'Velocity' was received from GB2004.
protected  boolean Visible
          If the item is in the field of view of the bot.
protected  boolean Visible_Set
          Whether property 'Visible' was received from GB2004.
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Entity
PROTOTYPE, SimTime
 
Constructor Summary
EntityMessage()
          Parameter-less contructor for the message.
EntityMessage(EntityMessage original)
          Cloning constructor from the full message.
EntityMessage(UnrealId Id, boolean Visible, Location Location, Rotation Rotation, Velocity Velocity, String Type, String EntityClass)
          Creates new instance of the message Entity.
 
Method Summary
 String getEntityClass()
          Type (category) of the entity.
 UnrealId getId()
          Unique Id of the item.
 EntityLocal getLocal()
           
 ILocalWorldObjectUpdatedEvent getLocalEvent()
           
 Location getLocation()
          Location of the item.
 Rotation getRotation()
          Rotation of the item.
 EntityShared getShared()
           
 ISharedWorldObjectUpdatedEvent getSharedEvent()
           
 EntityStatic getStatic()
           
 IStaticWorldObjectUpdatedEvent getStaticEvent()
           
 ITeamId getTeamId()
           
 String getType()
          Type (category) of the entity.
 Velocity getVelocity()
          Velocity of the item.
 boolean isVisible()
          If the item is in the field of view of the bot.
protected  void setTeamId(ITeamId TeamId)
          Used by Yylex to slip corretn TeamId.
 String toHtmlString()
           
 String toString()
           
 IWorldObjectUpdateResult<IWorldObject> update(IWorldObject object)
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Entity
createDisappearEvent, getSimTime, setSimTime, toJsonLiteral
 
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 ITeamId TeamId

Id

protected UnrealId Id
Unique Id of the item. This Id represents some entity in the world.


Id_Set

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


Visible

protected boolean Visible
If the item is in the field of view of the bot.


Visible_Set

protected boolean Visible_Set
Whether property 'Visible' was received from GB2004.


Location

protected Location Location
Location of the item.


Location_Set

protected boolean Location_Set
Whether property 'Location' was received from GB2004.


Rotation

protected Rotation Rotation
Rotation of the item.


Rotation_Set

protected boolean Rotation_Set
Whether property 'Rotation' was received from GB2004.


Velocity

protected Velocity Velocity
Velocity of the item.


Velocity_Set

protected boolean Velocity_Set
Whether property 'Velocity' was received from GB2004.


Type

protected String Type
Type (category) of the entity.


Type_Set

protected boolean Type_Set
Whether property 'Type' was received from GB2004.


EntityClass

protected String EntityClass
Type (category) of the entity.


EntityClass_Set

protected boolean EntityClass_Set
Whether property 'EntityClass' was received from GB2004.

Constructor Detail

EntityMessage

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


EntityMessage

public EntityMessage(UnrealId Id,
                     boolean Visible,
                     Location Location,
                     Rotation Rotation,
                     Velocity Velocity,
                     String Type,
                     String EntityClass)
Creates new instance of the message Entity. Generic physical entity that may be present in the world. Works as a hook for custom objects, such as new items from EmohawkRPG extension. Corresponding GameBots message is ENT.

Parameters:
Id - Unique Id of the item. This Id represents some entity in the world.
Visible - If the item is in the field of view of the bot.
Location - Location of the item.
Rotation - Rotation of the item.
Velocity - Velocity of the item.
Type - Type (category) of the entity.
EntityClass - Type (category) of the entity.

EntityMessage

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

Parameters:
original -
Method Detail

setTeamId

protected void setTeamId(ITeamId TeamId)
Used by Yylex to slip corretn TeamId.


getTeamId

public ITeamId getTeamId()

getId

public UnrealId getId()
Description copied from class: Entity
Unique Id of the item. This Id represents some entity in the world.

Specified by:
getId in interface IWorldObjectUpdatedEvent
Specified by:
getId in interface IWorldObject
Specified by:
getId in interface ICompositeWorldObjectUpdatedEvent
Specified by:
getId in class Entity

isVisible

public boolean isVisible()
Description copied from class: Entity
If the item is in the field of view of the bot.

Specified by:
isVisible in interface IViewable
Specified by:
isVisible in class Entity

getLocation

public Location getLocation()
Description copied from class: Entity
Location of the item.

Specified by:
getLocation in interface ILocated
Specified by:
getLocation in class Entity

getRotation

public Rotation getRotation()
Description copied from class: Entity
Rotation of the item.

Specified by:
getRotation in class Entity

getVelocity

public Velocity getVelocity()
Description copied from class: Entity
Velocity of the item.

Specified by:
getVelocity in class Entity

getType

public String getType()
Description copied from class: Entity
Type (category) of the entity.

Specified by:
getType in class Entity

getEntityClass

public String getEntityClass()
Description copied from class: Entity
Type (category) of the entity.

Specified by:
getEntityClass in class Entity

getLocal

public EntityLocal getLocal()
Specified by:
getLocal in interface ICompositeWorldObject

getShared

public EntityShared getShared()
Specified by:
getShared in interface ICompositeWorldObject

getStatic

public EntityStatic getStatic()
Specified by:
getStatic in interface ICompositeWorldObject

update

public IWorldObjectUpdateResult<IWorldObject> update(IWorldObject object)
Specified by:
update in interface IWorldObjectUpdatedEvent

getLocalEvent

public ILocalWorldObjectUpdatedEvent getLocalEvent()
Specified by:
getLocalEvent in interface ICompositeWorldObjectUpdatedEvent

getSharedEvent

public ISharedWorldObjectUpdatedEvent getSharedEvent()
Specified by:
getSharedEvent in interface ICompositeWorldObjectUpdatedEvent

getStaticEvent

public IStaticWorldObjectUpdatedEvent getStaticEvent()
Specified by:
getStaticEvent in interface ICompositeWorldObjectUpdatedEvent

toString

public String toString()
Overrides:
toString in class Entity

toHtmlString

public String toHtmlString()
Overrides:
toHtmlString in class Entity


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