Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

astar2.cpp File Reference

Pathfinding routines using the A* algorithm. More...

#include <stack>
#include <vector>
#include <functional>
#include <algorithm>
#include "vehicletype.h"
#include "spfst.h"
#include "controls.h"
#include "astar2.h"

Include dependency graph for astar2.cpp:

Go to the source code of this file.

Functions

bool operator< (const AStar::Node &a, const AStar::Node &b)
bool operator> (const AStar::Node &a, const AStar::Node &b)
bool operator== (const AStar::HexCoord &a, const AStar::HexCoord &b)
bool operator== (const AStar::Node &a, const AStar::Node &b)
HexDirection ReverseDirection (HexDirection d)
void findPath (GameMap *actmap, AStar::Path &path, Vehicle *veh, int x, int y)
 finding a path for unit veh to position x, y on map actmap.
bool operator> (const AStar3D::Node &a, const AStar3D::Node &b)
bool operator== (const AStar3D::Node &a, const AStar3D::Node &b)
const int * getDirectionOrder (int x, int y, int x2, int y2)


Detailed Description

Pathfinding routines using the A* algorithm.

Definition in file astar2.cpp.


Function Documentation

void findPath GameMap actmap,
AStar::Path path,
Vehicle veh,
int  x,
int  y
 

finding a path for unit veh to position x, y on map actmap.

Definition at line 348 of file astar2.cpp.

References AStar::findPath(), Vehicle::xpos, and Vehicle::ypos.

const int* getDirectionOrder int  x,
int  y,
int  x2,
int  y2
 

Definition at line 584 of file astar2.cpp.

References sidenum.

Referenced by AStar3D::findPath().

bool operator< const AStar::Node a,
const AStar::Node b
 

Definition at line 27 of file astar2.cpp.

References AStar::Node::gval, and AStar::Node::hval.

bool operator== const AStar3D::Node a,
const AStar3D::Node b
 

Definition at line 397 of file astar2.cpp.

References AStar3D::Node::gval, AStar3D::Node::h, and AStar3D::Node::hval.

bool operator== const AStar::Node a,
const AStar::Node b
 

Definition at line 46 of file astar2.cpp.

References AStar::Node::gval, AStar::Node::h, and AStar::Node::hval.

bool operator== const AStar::HexCoord a,
const AStar::HexCoord b
 

Definition at line 40 of file astar2.cpp.

References AStar::HexCoord::m, and AStar::HexCoord::n.

bool operator> const AStar3D::Node a,
const AStar3D::Node b
 

Definition at line 388 of file astar2.cpp.

References AStar3D::Node::gval, AStar3D::Node::hval, and AStar3D::longestPath.

bool operator> const AStar::Node a,
const AStar::Node b
 

Definition at line 34 of file astar2.cpp.

References AStar::Node::gval, and AStar::Node::hval.

HexDirection ReverseDirection HexDirection  d  ) 
 

Definition at line 54 of file astar2.cpp.

Referenced by AStar::findPath(), and AStar3D::nodeVisited().


Generated on Tue Jun 24 01:31:42 2008 for Advanced Strategic Command by  doxygen 1.4.2