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

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPointLocal
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPointLocalImpl
All Implemented Interfaces:
IWorldObject, ILocalViewable, ILocalWorldObject, ILocalGBViewable, java.lang.Cloneable

public class NavPointLocalImpl
extends NavPointLocal

Implementation of the local part of the GameBots2004 message NAV.

Complete message documentation: Synchronous message. NavPoint carries information about UT navigation point - location, reachability... Also some item can be respawned at this point. Or some additional information can be stored here (if it is an ambush point, or sniper point..).


Nested Class Summary
static class NavPointLocalImpl.NavPointLocalUpdate
           
 
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPointLocal
NavPointLocal.ObjectDisappeared
 
Field Summary
protected  UnrealId Id
          A unique Id of this navigation point assigned by the game.
protected  boolean Reachable
          If the bot can reach the point directly.
protected  boolean Visible
          If the point is in the field of view of the bot.
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPointLocal
SimTime
 
Constructor Summary
NavPointLocalImpl()
          Parameter-less contructor for the message.
NavPointLocalImpl(NavPoint original)
          Cloning constructor from the full message.
NavPointLocalImpl(NavPointLocal original)
          Cloning constructor from the message part.
NavPointLocalImpl(NavPointLocalImpl original)
          Cloning constructor from the full message.
NavPointLocalImpl(UnrealId Id, boolean Visible, boolean Reachable)
          Creates new instance of the message NavPoint.
 
Method Summary
 NavPointLocalImpl clone()
           
 UnrealId getId()
          A unique Id of this navigation point assigned by the game.
 NavPointLocalImpl getLocal()
           
 ISharedWorldObject getShared()
           
 IStaticWorldObject getStatic()
           
 boolean isReachable()
          If the bot can reach the point directly.
 boolean isVisible()
          If the point is in the field of view of the bot.
 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.NavPointLocal
createDisappearEvent, getCompositeClass, getSimTime
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Id

protected UnrealId Id
A unique Id of this navigation point assigned by the game.


Visible

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


Reachable

protected boolean Reachable
If the bot can reach the point directly. This is a bit tricky. Only point in radius around 900 ut units are evaluated. More ditant points will always return false. Moreover, bot may be required to jump somewhere on the direct path toward this point, if reachable it true (only normal jump is required, if double jump would be required, reachable would be false). Also, bot may be required to fall down from a ramp if he is standing on some.

Constructor Detail

NavPointLocalImpl

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


NavPointLocalImpl

public NavPointLocalImpl(UnrealId Id,
                         boolean Visible,
                         boolean Reachable)
Creates new instance of the message NavPoint. Synchronous message. NavPoint carries information about UT navigation point - location, reachability... Also some item can be respawned at this point. Or some additional information can be stored here (if it is an ambush point, or sniper point..). Corresponding GameBots message (local part) is NAV.

Parameters:
Id - A unique Id of this navigation point assigned by the game.
Visible - If the point is in the field of view of the bot.
Reachable - If the bot can reach the point directly. This is a bit tricky. Only point in radius around 900 ut units are evaluated. More ditant points will always return false. Moreover, bot may be required to jump somewhere on the direct path toward this point, if reachable it true (only normal jump is required, if double jump would be required, reachable would be false). Also, bot may be required to fall down from a ramp if he is standing on some.

NavPointLocalImpl

public NavPointLocalImpl(NavPoint original)
Cloning constructor from the full message.

Parameters:
original -

NavPointLocalImpl

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

Parameters:
original -

NavPointLocalImpl

public NavPointLocalImpl(NavPointLocal original)
Cloning constructor from the message part.

Parameters:
original -
Method Detail

setSimTime

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

Overrides:
setSimTime in class NavPointLocal

clone

public NavPointLocalImpl clone()
Specified by:
clone in interface ILocalWorldObject
Specified by:
clone in class NavPointLocal

getId

public UnrealId getId()
A unique Id of this navigation point assigned by the game.

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

isVisible

public boolean isVisible()
If the point is in the field of view of the bot.

Specified by:
isVisible in interface ILocalViewable
Specified by:
isVisible in class NavPointLocal
Returns:

isReachable

public boolean isReachable()
If the bot can reach the point directly. This is a bit tricky. Only point in radius around 900 ut units are evaluated. More ditant points will always return false. Moreover, bot may be required to jump somewhere on the direct path toward this point, if reachable it true (only normal jump is required, if double jump would be required, reachable would be false). Also, bot may be required to fall down from a ramp if he is standing on some.

Specified by:
isReachable in class NavPointLocal

getLocal

public NavPointLocalImpl getLocal()
Overrides:
getLocal in class NavPointLocal

getShared

public ISharedWorldObject getShared()
Overrides:
getShared in class NavPointLocal

getStatic

public IStaticWorldObject getStatic()
Overrides:
getStatic in class NavPointLocal

toString

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

toHtmlString

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