astar2.cpp File Reference

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

#include <stack>
#include <vector>
#include <functional>
#include <algorithm>
#include <cmath>
#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::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 347 of file astar2.cpp.

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

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

Definition at line 587 of file astar2.cpp.

References sidenum.

Referenced by AStar3D::findPath().

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

Definition at line 396 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 387 of file astar2.cpp.

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

HexDirection ReverseDirection ( HexDirection  d  ) 

Definition at line 54 of file astar2.cpp.

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


Generated on Mon May 21 01:29:25 2012 for Advanced Strategic Command by  doxygen 1.5.1