Go to the documentation of this file.
18 #ifndef MAPABSTRACTION_H
19 #define MAPABSTRACTION_H
28 MapAbstraction(
Map *_m) :m(_m), levelDraw(0) {}
29 virtual ~MapAbstraction();
31 virtual MapAbstraction *Clone(
Map *) = 0;
32 node *GetNodeFromMap(
int x,
int y,
tCorner c =
kNone) {
return abstractions[0]->GetNode(m->GetNodeNum(x, y, c)); }
33 void GetTileFromNode(
node *n,
int &x,
int &y);
34 void GetRandomTileFromNode(
node *n,
int &x,
int &y);
37 void GetTileUnderLoc(
int &x,
int &y,
const recVec &);
44 double OctileDistance(
double,
double,
double,
double);
48 void ToggleDrawAbstraction(
int which);
53 void DrawLevelConnections(
node *n)
const;
54 void DrawGraph(
Graph *g,
bool levels =
true)
const;
57 unsigned long levelDraw;
A generic class for basic operations on Graph abstractions.
virtual Map * GetMap() const =0
virtual MapAbstraction * GetMapAbstraction()=0
A generic vector (essentially the same as a point, but offers normalization)
virtual void OpenGLDraw() const
void ClearMarkedNodes()
rebuild hierarchy from original domain */
virtual double h(node *a, node *b)=0
heuristic cost between any two nodes
Graph * GetMapGraph(Map *m)
GetMapGraph(map)
void AddMapEdges(Map *m, Graph *g, int x, int y)
virtual recVec GetNodeLoc(node *) const
Nodes to be stored within a Graph.
A tile-based representation of the world.