cz.cuni.amis.pogamut.ut2004.agent.module.sensor
Class NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER>

java.lang.Object
  extended by cz.cuni.amis.pogamut.ut2004.agent.module.sensor.NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER>
Direct Known Subclasses:
NavigationGraphBuilder.ExistingNavPointEdgeBuilder
Enclosing class:
NavigationGraphBuilder

public class NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER>
extends java.lang.Object

Represents the edge of the navpoint you're newly creating.

WARNING: the created edge is oriented! Its counterpart (from the remote navpoint to newly created one) must be created manually! (If needed.)


Field Summary
protected  int collisionH
           
protected  int collisionR
           
protected  int flags
           
protected  boolean forceDoubleJump
           
protected  Vector3d neededJump
           
protected  OWNER owner
           
protected  UnrealId toNavPointId
           
 
Constructor Summary
protected NavigationGraphBuilder.NewNavPointEdgeBuilder(OWNER owner)
           
 
Method Summary
 OWNER createEdge()
          Finalizes the creation of the edge.
 NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setCollisionHeight(int collisionHeight)
          Sets collision height of the edge, corresponds to NavPointNeighbourLink.getCollisionH().
 NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setCollisionRadius(int collisionRadius)
          Sets collision radius of the edge, corresponds to NavPointNeighbourLink.getCollisionR().
 NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setDoorFlag()
          Sets LinkFlag.DOOR flag into flags of the new navpoint edge, corresponds to NavPointNeighbourLink.getFlags().
 NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setDoubleJump()
          Sets the flag "double jump is needed" to true, corresponds to NavPointNeighbourLink.isForceDoubleJump().
 NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setFlyFlag()
          Sets LinkFlag.FLY flag into flags of the new navpoint edge, corresponds to NavPointNeighbourLink.getFlags().
 NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setForcedFlag()
          Sets LinkFlag.FORCED flag into flags of the new navpoint edge, corresponds to NavPointNeighbourLink.getFlags().
 NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setJumpFlag()
          Sets LinkFlag.JUMP flag into flags of the new navpoint edge, corresponds to NavPointNeighbourLink.getFlags().
 NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setLadderFlag()
          Sets LinkFlag.LADDER flag into flags of the new navpoint edge, corresponds to NavPointNeighbourLink.getFlags().
 NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setNeededJump(double x, double y, double z)
          Sets the location from where the bot should jump to reach the target, corresponds to NavPointNeighbourLink.getNeededJump().
 NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setPlayerOnlyFlag()
          Sets LinkFlag#PLAYERONLYK flag into flags of the new navpoint edge, corresponds to NavPointNeighbourLink.getFlags().
 NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setProscribedFlag()
          Sets LinkFlag.PROSCRIBED flag into flags of the new navpoint edge, corresponds to NavPointNeighbourLink.getFlags().
 NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setSpecialFlag()
          Sets LinkFlag.SPECIAL flag into flags of the new navpoint edge, corresponds to NavPointNeighbourLink.getFlags().
 NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setSwimFlag()
          Sets LinkFlag.SWIM flag into flags of the new navpoint edge, corresponds to NavPointNeighbourLink.getFlags().
 NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setTo(java.lang.String navPointId)
          Sets the remote end of the edge (i.e., navpoint id where the edge is leading to), corresponds to NavPointNeighbourLink.getToNavPoint().
 NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setTo(UnrealId navPointId)
          Sets the remote end of the edge (i.e., navpoint id where the edge is leading to), corresponds to NavPointNeighbourLink.getToNavPoint().
 NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setWalkFlag()
          Sets LinkFlag.WALK flag into flags of the new navpoint edge, corresponds to NavPointNeighbourLink.getFlags().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

owner

protected OWNER owner

toNavPointId

protected UnrealId toNavPointId

collisionR

protected int collisionR

collisionH

protected int collisionH

forceDoubleJump

protected boolean forceDoubleJump

neededJump

protected Vector3d neededJump

flags

protected int flags
Constructor Detail

NavigationGraphBuilder.NewNavPointEdgeBuilder

protected NavigationGraphBuilder.NewNavPointEdgeBuilder(OWNER owner)
Method Detail

setTo

public NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setTo(java.lang.String navPointId)
Sets the remote end of the edge (i.e., navpoint id where the edge is leading to), corresponds to NavPointNeighbourLink.getToNavPoint().

Parameters:
navPointId - will be auto-prefixed (if enabled, which is default)
Returns:

setTo

public NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setTo(UnrealId navPointId)
Sets the remote end of the edge (i.e., navpoint id where the edge is leading to), corresponds to NavPointNeighbourLink.getToNavPoint().

Parameters:
navPointId - WON'T BE AUTO-PREFIXED AS IT IS ALREADY EXISTING ID!!!
Returns:

setCollisionRadius

public NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setCollisionRadius(int collisionRadius)
Sets collision radius of the edge, corresponds to NavPointNeighbourLink.getCollisionR().

Parameters:
collisionRadius -
Returns:

setCollisionHeight

public NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setCollisionHeight(int collisionHeight)
Sets collision height of the edge, corresponds to NavPointNeighbourLink.getCollisionH().

Parameters:
collisionHeight -
Returns:

setNeededJump

public NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setNeededJump(double x,
                                                                          double y,
                                                                          double z)
Sets the location from where the bot should jump to reach the target, corresponds to NavPointNeighbourLink.getNeededJump().

Parameters:
x -
y -
z -
Returns:

setDoubleJump

public NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setDoubleJump()
Sets the flag "double jump is needed" to true, corresponds to NavPointNeighbourLink.isForceDoubleJump().

Parameters:
neededJump -
Returns:

setWalkFlag

public NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setWalkFlag()
Sets LinkFlag.WALK flag into flags of the new navpoint edge, corresponds to NavPointNeighbourLink.getFlags().

Returns:

setFlyFlag

public NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setFlyFlag()
Sets LinkFlag.FLY flag into flags of the new navpoint edge, corresponds to NavPointNeighbourLink.getFlags().

Returns:

setSwimFlag

public NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setSwimFlag()
Sets LinkFlag.SWIM flag into flags of the new navpoint edge, corresponds to NavPointNeighbourLink.getFlags().

Returns:

setJumpFlag

public NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setJumpFlag()
Sets LinkFlag.JUMP flag into flags of the new navpoint edge, corresponds to NavPointNeighbourLink.getFlags().

Returns:

setDoorFlag

public NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setDoorFlag()
Sets LinkFlag.DOOR flag into flags of the new navpoint edge, corresponds to NavPointNeighbourLink.getFlags().

Returns:

setSpecialFlag

public NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setSpecialFlag()
Sets LinkFlag.SPECIAL flag into flags of the new navpoint edge, corresponds to NavPointNeighbourLink.getFlags().

Returns:

setLadderFlag

public NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setLadderFlag()
Sets LinkFlag.LADDER flag into flags of the new navpoint edge, corresponds to NavPointNeighbourLink.getFlags().

Returns:

setProscribedFlag

public NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setProscribedFlag()
Sets LinkFlag.PROSCRIBED flag into flags of the new navpoint edge, corresponds to NavPointNeighbourLink.getFlags().

Returns:

setForcedFlag

public NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setForcedFlag()
Sets LinkFlag.FORCED flag into flags of the new navpoint edge, corresponds to NavPointNeighbourLink.getFlags().

Returns:

setPlayerOnlyFlag

public NavigationGraphBuilder.NewNavPointEdgeBuilder<OWNER> setPlayerOnlyFlag()
Sets LinkFlag#PLAYERONLYK flag into flags of the new navpoint edge, corresponds to NavPointNeighbourLink.getFlags().

Returns:

createEdge

public OWNER createEdge()
Finalizes the creation of the edge.

Edge remote end must be set via setTo(String) before otherwise an exception is thrown.

WARNING: the created edge is oriented! Its counterpart (from the remote navpoint to newly created one) must be created manually! (If needed.)

Returns:
nav point the edge is going from (i.e., one you're building)