| Trees | Index | Help |
|
|---|
| Package svs_simulation :: Package ai_lib :: Module pathfinding :: Class PathPlanner |
|
| Method Summary | |
|---|---|
__init__(self,
entity)
| |
The path manager calls this to iterate once though the search cycle of the currently assigned search algorithm. | |
Returns the index of the closest visible and unobstructed graph node to the given position. | |
Returns the cost to the closest instance of the GiverType. | |
Returns the cost to travel from the entity's current position to a specific graph node. | |
getDestination(self)
| |
Used to retrieve the position of a graph node from its index. | |
Called by an agent after it has been notified that a search has terminated successfully. | |
Called at the commencement of a new search request. | |
Creates an instance of the A* time-sliced search and registers it with the path manager. | |
Creates an instance of the Dijkstra's time-sliced search and registers it with the path manager. | |
setDestination(self,
newPos)
| |
Smooths a path by removing extraneous edges. | |
Smooths a path by removing extraneous edges. | |
| Method Details |
|---|
cycleOnce(self)The path manager calls this to iterate once though the search cycle of the currently assigned search algorithm. When a search is terminated the method messages the owner with either the msg_NoPathAvailable or msg_PathReady messages. |
getClosestNodeToPosition(self, pos)Returns the index of the closest visible and unobstructed graph node to the given position. |
getCostToClosestItem(self, GiverType)Returns the cost to the closest instance of the GiverType. This method also makes use of the pre-calculated lookup table. Returns -1 if no active trigger found. |
getCostToNode(self, node)Returns the cost to travel from the entity's current position to a specific graph node. This method makes use of the pre-calculated lookup table created by Raven_Game. |
getNodePosition(self, idx)Used to retrieve the position of a graph node from its index. Takes into account the enumerations 'non_graph_source_node' and 'non_graph_target_node' |
getPath(self)Called by an agent after it has been notified that a search has terminated successfully. The method extracts the path fromPathPlanner.currentSearch, adds additional edges
appropriate to the search type and returns it as a list of
PathEdges.
|
prepareForNewSearch()Called at the commencement of a new search request. It clears up the appropriate lists and memory in preparation for a new search request. |
requestPathToItem(self, item)Creates an instance of the A* time-sliced search and registers it with the path manager. |
requestPathToPosition(self, targetPos)Creates an instance of the Dijkstra's time-sliced search and registers it with the path manager. |
smoothPathEdgesPrecise(self, path)Smooths a path by removing extraneous edges. This removes *all* extraneous edges. |
smoothPathEdgesQuick(self, path)Smooths a path by removing extraneous edges. Note: this may not remove all extraneous edges. |
| Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Thu Oct 20 15:30:25 2005 | http://epydoc.sf.net |