A region handler.
More...
#include "Region.h"
◆ Region()
Overseer::Region::Region |
( |
size_t |
regionId, |
|
|
std::shared_ptr< TilePosition > |
tilePosition |
|
) |
| |
constructor.
- Parameters
-
regionId | The id a region |
tilePosition | A tileposition within the region. |
◆ addTilePosition() [1/2]
void Overseer::Region::addTilePosition |
( |
std::shared_ptr< TilePosition > |
tilePosition | ) |
|
Add tile position to region.
- Parameters
-
◆ addTilePosition() [2/2]
void Overseer::Region::addTilePosition |
( |
TilePosition & |
tilePosition | ) |
|
Add tile position to region.
- Parameters
-
◆ getArea()
size_t Overseer::Region::getArea |
( |
| ) |
const |
Gets the number of points within the region, which corresponds to it's area.
- Returns
- The number of tile positiions within the region.
◆ getId()
size_t Overseer::Region::getId |
( |
| ) |
const |
Get region id.
- Returns
- This region id
◆ getLargestDistanceToUnpathable()
double Overseer::Region::getLargestDistanceToUnpathable |
( |
| ) |
const |
get the longest path to a unpathable.
- Returns
- the path.
◆ getMidPoint()
sc2::Point2D Overseer::Region::getMidPoint |
( |
| ) |
const |
Get the mid point of this region.
- Returns
- region mid point
◆ getNeutralUnitPositions()
const std::vector< UnitPosition > Overseer::Region::getNeutralUnitPositions |
( |
| ) |
|
Returns the edges of the region.
- Returns
- vector with edges. Returns the units and positions occupying the region
-
const vector with unit positions.
◆ getPoints()
std::vector< sc2::Point2D > Overseer::Region::getPoints |
( |
| ) |
const |
Gets all mid points from all tiles within this region.
- Returns
- vector the sc2::Point2D
◆ getTilePositions()
std::vector< TilePosition > Overseer::Region::getTilePositions |
( |
| ) |
const |
Get the tile positions within the region.
- Returns
- vector with tileposition.
◆ merge()
void Overseer::Region::merge |
( |
Region |
region | ) |
|
Merges two regions (INTERNAL USE ONLY).
- Parameters
-
region | The region to merge with THIS region. |
◆ setId()
void Overseer::Region::setId |
( |
size_t |
regionId | ) |
|
set the region id (INTERNAL USE ONLY)
- Parameters
-
The documentation for this class was generated from the following files: