cad.simcad.objectserver.spec.pathfinding
Interface PathFindable

All Known Implementing Classes:
CellMap

public interface PathFindable

Any object wanting to be searched by a pathfinding algorithm should implement this interfaces

Version:
1.0
Author:
Charles-Philip Bentley

Method Summary
 double computeHeuristic(PathPlace pp, PathPlace dest)
           
 double computeHeuristic(PathPlace origin, PathPlace dest, double factor)
           
 void firePathComputation(PathPlaceSet path)
          Notice the Listeners and the PathUser that a Path has been computed
 void firePathPlaceChange(PathPlace mp)
           
 PathPlace[] getAdjacent(PathPlace mp)
          Returns the PathPlace adjacent to the given PathPlace
 double getCostToReach(PathPlace from, PathPlace to, PathUser pu)
           
 java.lang.String getName()
           
 void setValue(PathPlace pp, double value)
          Delegates the work of tagging the given PathPlace with a double value
 

Method Detail

getAdjacent

public PathPlace[] getAdjacent(PathPlace mp)
Returns the PathPlace adjacent to the given PathPlace

Parameters:
mp - the PathPlace
Pre:
a PathPlace that belongs to PathFindable
Returns:
an array of PathPlace
Post:
Return the PathPlaces that are adjacent to mp. The policy for determining when two PathPlaces are adjacent is left to the PathFindable

firePathComputation

public void firePathComputation(PathPlaceSet path)
Notice the Listeners and the PathUser that a Path has been computed


firePathPlaceChange

public void firePathPlaceChange(PathPlace mp)

getCostToReach

public double getCostToReach(PathPlace from,
                             PathPlace to,
                             PathUser pu)

setValue

public void setValue(PathPlace pp,
                     double value)
Delegates the work of tagging the given PathPlace with a double value

Parameters:
value -
pp -
Pre:
-
Post:
PathPlace pp is tagged with value value

computeHeuristic

public double computeHeuristic(PathPlace pp,
                               PathPlace dest)
Parameters:
dest -
Pre:
Two PathPlaces
Returns:
a double value
Post:
Return the heuristic for that PathFindable

computeHeuristic

public double computeHeuristic(PathPlace origin,
                               PathPlace dest,
                               double factor)
Parameters:
origin -
dest -
factor -
Pre:
Two PathPlaces
Returns:
a double value
Post:
Return the heuristic for that PathFindable

getName

public java.lang.String getName()

Logo

With the help of www.sourceforge.net and www.info.ucl.ac.be