cz.cuni.amis.pogamut.ut2004.agent.module.sensor
Class NavigationGraphBuilder.NewNavPointBuilder

java.lang.Object
  extended by cz.cuni.amis.pogamut.ut2004.agent.module.sensor.NavigationGraphBuilder.NewNavPointBuilder
Enclosing class:
NavigationGraphBuilder

public class NavigationGraphBuilder.NewNavPointBuilder
extends java.lang.Object

Builder encloses the creation of the new navpoint.

You must call createNavPoint() after you set it up to truly create the navpoint inside bot's IWorldView.


Constructor Summary
protected NavigationGraphBuilder.NewNavPointBuilder()
           
 
Method Summary
protected  void addEdge(NavigationGraphBuilder.NewNavPointEdgeBuilder newNavPointEdgeBuilder)
          Adds new edge into edges.
 void createNavPoint()
          Finalizing method that will insert the navpoint into the underlying IWorldView of the bot.
 void createSimpleEdgeTo(java.lang.String navPointId)
          Creates simple edge that leads from the navpoint you're currently creating to 'navPointId'
 NavigationGraphBuilder.NewNavPointEdgeBuilder<NavigationGraphBuilder.NewNavPointBuilder> newEdge()
          Creates new edge builder for the navpoint you're creating.
 NavigationGraphBuilder.NewNavPointEdgeBuilder<NavigationGraphBuilder.NewNavPointBuilder> newEdgeTo(java.lang.String navPointId)
          Creates new edge (to 'navPointId') builder for the navpoint you're creating.
 NavigationGraphBuilder.NewNavPointBuilder setId(java.lang.String id)
          Sets the ID to be used for the new navpoint, corresponds to NavPoint.getId().
 NavigationGraphBuilder.NewNavPointBuilder setLocation(double x, double y, double z)
          Sets the location of the new navpoint, corresponds to NavPoint.getLocation().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NavigationGraphBuilder.NewNavPointBuilder

protected NavigationGraphBuilder.NewNavPointBuilder()
Method Detail

setId

public NavigationGraphBuilder.NewNavPointBuilder setId(java.lang.String id)
Sets the ID to be used for the new navpoint, corresponds to NavPoint.getId().

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

setLocation

public NavigationGraphBuilder.NewNavPointBuilder setLocation(double x,
                                                             double y,
                                                             double z)
Sets the location of the new navpoint, corresponds to NavPoint.getLocation().

Parameters:
x -
y -
z -
Returns:

createNavPoint

public void createNavPoint()
Finalizing method that will insert the navpoint into the underlying IWorldView of the bot.

You must have ID/Location set via setId(String) and setLocation(double, double, double) otherwise an exception will be thrown.

WARNING: IF USED INSIDE THE IAgentLogic.logic(), THAN THE NEW NAVPOINT WON'T BE ACCESSIBLE IMMEDIATELLY, IT WILL BE ACCESSIBLE FROM THE NEXT LOGIC ITERATION!


newEdge

public NavigationGraphBuilder.NewNavPointEdgeBuilder<NavigationGraphBuilder.NewNavPointBuilder> newEdge()
Creates new edge builder for the navpoint you're creating.

After setting up the edge properties, use NavigationGraphBuilder.NewNavPointEdgeBuilder.createEdge() to return to this object (and truly creates the edge!).

Returns:
edge builder

newEdgeTo

public NavigationGraphBuilder.NewNavPointEdgeBuilder<NavigationGraphBuilder.NewNavPointBuilder> newEdgeTo(java.lang.String navPointId)
Creates new edge (to 'navPointId') builder for the navpoint you're creating.

After setting up the edge properties, use NavigationGraphBuilder.NewNavPointEdgeBuilder.createEdge() to return to this object (and truly creates the edge!).

Parameters:
navPointId - will be auto-prefixed
Returns:
edge builder

createSimpleEdgeTo

public void createSimpleEdgeTo(java.lang.String navPointId)
Creates simple edge that leads from the navpoint you're currently creating to 'navPointId'

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

addEdge

protected void addEdge(NavigationGraphBuilder.NewNavPointEdgeBuilder newNavPointEdgeBuilder)
Adds new edge into edges. Their true creation is postponed until createNavPoint().

Parameters:
newNavPointEdgeBuilder -