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

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.IncomingProjectile
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.IncomingProjectileCompositeImpl
All Implemented Interfaces:
IWorldChangeEvent, IWorldEvent, IWorldObject, ICompositeWorldObject, Event

public class IncomingProjectileCompositeImpl
extends IncomingProjectile

Composite implementation of the PRJ abstract message. It wraps Local/Shared/Static parts in single object allowing to presenting a nice facade for users.

Complete message documentation: Both asynchronous and synchronous message. Incoming projectile that we can see.


Nested Class Summary
 
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.IncomingProjectile
IncomingProjectile.IncomingProjectileUpdate
 
Field Summary
protected  IncomingProjectileLocalImpl partLocal
           
protected  IncomingProjectileStaticImpl partStatic
           
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.IncomingProjectile
PROTOTYPE, SimTime
 
Constructor Summary
IncomingProjectileCompositeImpl()
          Parameter-less contructor for the message.
IncomingProjectileCompositeImpl(IncomingProjectileCompositeImpl original)
          Cloning constructor.
IncomingProjectileCompositeImpl(IncomingProjectileLocalImpl partLocal, IncomingProjectileSharedImpl partShared, IncomingProjectileStaticImpl partStatic)
          Composite-impl constructor.
 
Method Summary
 double getDamageRadius()
          If the projectile has splash damage, how big it is – in ut units.
 Vector3d getDirection()
          Which direction projectile is heading to -> orientation vector.
 UnrealId getId()
          Unique Id of the projectile.
 double getImpactTime()
          Estimated time till impact.
 IncomingProjectileLocal getLocal()
           
 Location getLocation()
          Current location of the projectile.
 Location getOrigin()
          Possition of the origin, when combined with direction can define the line of fire.
 IncomingProjectileShared getShared()
           
 double getSpeed()
          Current speed of the projectile.
 IncomingProjectileStatic getStatic()
           
 java.lang.String getType()
          The class of the projectile (so you know what is flying against you).
 Velocity getVelocity()
          Current velocity vector of the projectile.
 void setSimTime(long SimTime)
          Used by Yylex to slip correct time of the object or programmatically.
 java.lang.String toHtmlString()
           
 java.lang.String toString()
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.IncomingProjectile
getSimTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

partStatic

protected IncomingProjectileStaticImpl partStatic

partLocal

protected IncomingProjectileLocalImpl partLocal
Constructor Detail

IncomingProjectileCompositeImpl

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


IncomingProjectileCompositeImpl

public IncomingProjectileCompositeImpl(IncomingProjectileLocalImpl partLocal,
                                       IncomingProjectileSharedImpl partShared,
                                       IncomingProjectileStaticImpl partStatic)
Composite-impl constructor. It assembles the message from its three fragments - local/shared/static.

Parameters:
partLocal - local-part of the message
partShared - shared-part of the message
partStatic - static-part of the message

IncomingProjectileCompositeImpl

public IncomingProjectileCompositeImpl(IncomingProjectileCompositeImpl original)
Cloning constructor.

Parameters:
original -
Method Detail

setSimTime

public void setSimTime(long SimTime)
Description copied from class: IncomingProjectile
Used by Yylex to slip correct time of the object or programmatically.

Overrides:
setSimTime in class IncomingProjectile

getStatic

public IncomingProjectileStatic getStatic()

getLocal

public IncomingProjectileLocal getLocal()

getShared

public IncomingProjectileShared getShared()

getId

public UnrealId getId()
Description copied from class: IncomingProjectile
Unique Id of the projectile.

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

getImpactTime

public double getImpactTime()
Description copied from class: IncomingProjectile
Estimated time till impact.

Specified by:
getImpactTime in class IncomingProjectile

getDirection

public Vector3d getDirection()
Description copied from class: IncomingProjectile
Which direction projectile is heading to -> orientation vector.

Specified by:
getDirection in class IncomingProjectile

getLocation

public Location getLocation()
Description copied from class: IncomingProjectile
Current location of the projectile.

Specified by:
getLocation in class IncomingProjectile

getVelocity

public Velocity getVelocity()
Description copied from class: IncomingProjectile
Current velocity vector of the projectile.

Specified by:
getVelocity in class IncomingProjectile

getSpeed

public double getSpeed()
Description copied from class: IncomingProjectile
Current speed of the projectile.

Specified by:
getSpeed in class IncomingProjectile

getOrigin

public Location getOrigin()
Description copied from class: IncomingProjectile
Possition of the origin, when combined with direction can define the line of fire.

Specified by:
getOrigin in class IncomingProjectile

getDamageRadius

public double getDamageRadius()
Description copied from class: IncomingProjectile
If the projectile has splash damage, how big it is – in ut units.

Specified by:
getDamageRadius in class IncomingProjectile

getType

public java.lang.String getType()
Description copied from class: IncomingProjectile
The class of the projectile (so you know what is flying against you).

Specified by:
getType in class IncomingProjectile

toString

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

toHtmlString

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