Overseer
MapImpl.h
1 #ifndef _MAPIMPL_H_
2 #define _MAPIMPL_H_
3 
4 #include "Graph.h"
5 #include "Map.h"
6 #include "NeutralSetObj.h"
7 #include "spatial/box_multimap.hpp"
8 #include "spatial/neighbor_iterator.hpp"
9 #include "spatial/ordered_iterator.hpp"
10 
11 namespace Overseer{
12 
17  class MapImpl : public Map {
18  public:
19 
20  ~MapImpl();
21 
27  MapImpl(sc2::Agent* bot);
28 
32  MapImpl();
33 
37  void initialize();
38 
42  Graph getGraph() const;
43 
44  private:
45 
46  // Create the tiles from the map.
47  void createTiles();
48  // Iterate over the tiles and compute the distance to nearest unpathable tile
49  void computeAltitudes();
50  // Used to check the type of "object" on the possition.
51  TileTerrain checkTerrainType(NeutralImpl* checkWith, sc2::Point2D& pos, const sc2::ObservationInterface* obs);
52  // Iterate over all tiles, starting with those furthest away from unpathables (probable candidates for region centers), and add to neighboring region
53  // Create new region if no neighboring region is found, if two are found merge the smaller into the larger or create frontier
54  std::vector<Region> computeTempRegions();
55  // Find the regions with a real area and add them to map, resolve the frontiers
56  void createRegions(std::vector<Region> tmp_regions);
57  // Find all possitions not added to regions and create the frontiers.
58  void createFrontiers();
59 
60  Graph m_graph;
61  };
62 }
63 #endif /* _MAPIMPL_H_ */
Definition: MapImpl.h:17
Used to find neutral objects on the map.
Definition: NeutralSetObj.h:14
Graph getGraph() const
get the graph representation of the map.
Definition: MapImpl.cpp:27
Definition: ChokePoint.cpp:3
is the overseer map that holds the most "important" functionality for a outside user.
Definition: Map.h:22
void initialize()
Initialize overseer, should be done after the map been loaded.
Definition: MapImpl.cpp:16
MapImpl()
Defualt constructor without member init.
Definition: MapImpl.cpp:14
Is a mathematical "graphmap" for analysing.
Definition: Graph.h:50