aystar.h File Reference

This file has the header for AyStar AyStar is a fast pathfinding routine and is used for things like AI_pathfinding and Train_pathfinding. More...

#include "queue.h"
#include "tile_type.h"
#include "track_type.h"

Go to the source code of this file.

Data Structures

struct  AyStarNode
struct  PathNode
struct  OpenListNode
struct  AyStar

Typedefs

typedef int32 AyStar_EndNodeCheck (AyStar *aystar, OpenListNode *current)
typedef int32 AyStar_CalculateG (AyStar *aystar, AyStarNode *current, OpenListNode *parent)
typedef int32 AyStar_CalculateH (AyStar *aystar, AyStarNode *current, OpenListNode *parent)
typedef void AyStar_GetNeighbours (AyStar *aystar, OpenListNode *current)
typedef void AyStar_FoundEndNode (AyStar *aystar, OpenListNode *current)
typedef void AyStar_AddStartNode (AyStar *aystar, AyStarNode *start_node, uint g)
typedef int AyStar_Main (AyStar *aystar)
typedef int AyStar_Loop (AyStar *aystar)
typedef int AyStar_CheckTile (AyStar *aystar, AyStarNode *current, OpenListNode *parent)
typedef void AyStar_Free (AyStar *aystar)
typedef void AyStar_Clear (AyStar *aystar)

Enumerations

enum  {
  AYSTAR_FOUND_END_NODE, AYSTAR_EMPTY_OPENLIST, AYSTAR_STILL_BUSY, AYSTAR_NO_PATH,
  AYSTAR_LIMIT_REACHED, AYSTAR_DONE
}
enum  { AYSTAR_INVALID_NODE = -1 }

Functions

void AyStarMain_AddStartNode (AyStar *aystar, AyStarNode *start_node, uint g)
int AyStarMain_Main (AyStar *aystar)
int AyStarMain_Loop (AyStar *aystar)
int AyStarMain_CheckTile (AyStar *aystar, AyStarNode *current, OpenListNode *parent)
void AyStarMain_Free (AyStar *aystar)
void AyStarMain_Clear (AyStar *aystar)
void init_AyStar (AyStar *aystar, Hash_HashProc hash, uint num_buckets)


Detailed Description

This file has the header for AyStar AyStar is a fast pathfinding routine and is used for things like AI_pathfinding and Train_pathfinding.

For more information about AyStar (A* Algorithm), you can look at http://en.wikipedia.org/wiki/A-star_search_algorithm

Definition in file aystar.h.


Generated on Wed Dec 23 20:12:54 2009 for OpenTTD by  doxygen 1.5.6