HOG2
|
#include "MapAbstraction.h"
Go to the source code of this file.
Functions | |
Graph * | GetMapGraph (Map *m) |
GetMapGraph(map) More... | |
void | AddMapEdges (Map *m, Graph *g, int x, int y) |
Variables | |
static const int | gEdgeProb = 100 |
AddMapEdges(map, Graph, x, y) More... | |
static const int | gStraightEdgeProb = 100 |
Definition at line 430 of file MapAbstraction.cpp.
References Graph::AddEdge(), Map::AdjacentEdges(), gEdgeProb, Map::GetSplit(), Map::GetTile(), gStraightEdgeProb, kBackwardSplit, GraphAbstractionConstants::kEdgeCapacity, kForwardSplit, kInternalEdge, kLeftEdge, kNoGraphNode, kRightEdge, kTopEdge, halfTile::node, ROOT_TWO, edge::SetLabelL(), Tile::tile1, and Tile::tile2.
Referenced by GetMapGraph().
GetMapGraph(map)
Given a map, this function uses the external map interfaces to turn it into a Graph, and sets the appropriate node numbers for that map. This function should not be called multiple times on the same map, because the original Graph map lose it's association with the map.
Definition at line 312 of file MapAbstraction.cpp.
References AddMapEdges(), Graph::AddNode(), Map::AdjacentEdges(), node::edgeIterNext(), node::getEdgeIter(), Map::GetMapHeight(), Map::GetMapWidth(), Graph::getNodeIter(), node::GetNum(), node::getNumIncomingEdges(), node::getNumOutgoingEdges(), Map::GetTerrainType(), Map::GetTile(), GraphAbstractionConstants::kAbstractionLevel, kBottomLeft, kBottomRight, GraphAbstractionConstants::kFirstData, kForwardSplit, kInternalEdge, kLeftEdge, GraphAbstractionConstants::kNodeBlocked, kNoGraphNode, kNone, GraphAbstractionConstants::kNumAbstractedNodes, kOutOfBounds, GraphAbstractionConstants::kParent, kRightEdge, kTopLeft, kTopRight, GraphAbstractionConstants::kUnknownPosition, GraphAbstractionConstants::kXCoordinate, halfTile::node, Graph::nodeIterNext(), node::SetLabelF(), node::SetLabelL(), Tile::split, Tile::tile1, and Tile::tile2.
Referenced by MapLineAbstraction::buildAbstraction(), RadiusAbstraction::buildAbstraction(), MapSectorAbstraction::buildAbstraction(), NodeLimitAbstraction::buildAbstraction(), MapCliqueAbstraction::buildAbstractions(), ClusterAbstraction::ClusterAbstraction(), and MapFlatAbstraction::MapFlatAbstraction().
|
static |
AddMapEdges(map, Graph, x, y)
This is a helper function for GetMapGraph that does the work of adding the Graph edges. Each edge is only added once, so while the Graph has directional edges, we treat them as being bidirectional.
Definition at line 427 of file MapAbstraction.cpp.
Referenced by AddMapEdges().
|
static |
Definition at line 428 of file MapAbstraction.cpp.
Referenced by AddMapEdges().