Overseer
|
Class that is used as a chokepoint container with size and positioning on the map. More...
#include "ChokePoint.h"
Public Member Functions | |
ChokePoint (const Region *region1, const Region *region2, size_t cp_id, std::vector< TilePosition > tilePositions) | |
class Constructor More... | |
std::pair< const Region *, const Region * > | getRegions () const |
Gets the regions where a chokepoint exists between them. More... | |
size_t | size () const |
Get the size of the found chokepoint. More... | |
sc2::Point2D | getMidPoint () const |
Gets the mid point of the chokepoint. More... | |
std::vector< sc2::Point2D > | getPoints () const |
Get the points within the chokepoint. More... | |
std::vector< TilePosition > | getTilePositions () const |
Get the tile positions inside the chokePoint. More... | |
ChokePointId | getId () const |
Get the id of the chokepoint. More... | |
bool | operator== (const ChokePoint &rhs) const |
How two chokepoints will be check if equal. | |
bool | adjacent (ChokePoint &cp) const |
check if this chokepoint share a region with chokepoint cp. More... | |
std::string | getStringId () const |
Gets the chokepoint id as a string. More... | |
size_t | getChokePointId () const |
Gets the chokepoints position between two regions (INTERNAL USE ONLY). | |
Class that is used as a chokepoint container with size and positioning on the map.
Overseer::ChokePoint::ChokePoint | ( | const Region * | region1, |
const Region * | region2, | ||
size_t | cp_id, | ||
std::vector< TilePosition > | tilePositions | ||
) |
class Constructor
region1 | is a adjecent region to region2 |
region2 | is a adjecent region to region1 |
The | position of the chokepoint between region1 and region2 starts at zero. |
tilePositions | is the "limits" between region1 and region2 |
bool Overseer::ChokePoint::adjacent | ( | ChokePoint & | cp | ) | const |
check if this chokepoint share a region with chokepoint cp.
cp | another chokepoint |
ChokePointId Overseer::ChokePoint::getId | ( | ) | const |
Get the id of the chokepoint.
sc2::Point2D Overseer::ChokePoint::getMidPoint | ( | ) | const |
Gets the mid point of the chokepoint.
std::vector< sc2::Point2D > Overseer::ChokePoint::getPoints | ( | ) | const |
Get the points within the chokepoint.
Gets the regions where a chokepoint exists between them.
std::string Overseer::ChokePoint::getStringId | ( | ) | const |
Gets the chokepoint id as a string.
std::vector<TilePosition> Overseer::ChokePoint::getTilePositions | ( | ) | const |
Get the tile positions inside the chokePoint.
size_t Overseer::ChokePoint::size | ( | ) | const |
Get the size of the found chokepoint.