|
Region
Region provides low level terrain navigation functionality.
Class header file: BWAPI/Region.h The Region class provides access to some of Broodwar's pathing information and offers members that can assist in navigation, scouting, construction, and information for key areas such as chokepoints. Though not always accurate, it is a lightweight alternative to BWTA that beginners can start with. These regions are not so advanced as to cover everything up to a choke point with accurate polygons, but instead are small clusters of tiles connected to each other, kind of like a honeycomb. MethodsgetIDint getID() const;Returns a unique ID that represents this region. This ID is the same one used by Broodwar. getRegionGroupIDint getRegionGroupID() const;Returns a value that represents the group that this region belongs to. A region group is a value that represents a fully connected group of regions, such as the entire mainland. An island for example, will have a different region ID than the main land. getCenter[Position] getCenter() const;Returns a position that represents the region's center. isHigherGroundbool isHigherGround() const;Returns true if the region is part of strategic higher ground. Strategic higher ground can be any high ground region. getDefensePriorityint getDefensePriority() const;Returns a value that represents the priority given to the region for defensive or offensive measures. A value of 2 may represent a choke point. This representation may not always be accurate. isWalkablebool isWalkable() const;Returns true if the entire region is walkable. getNeighborsconst std::set<Region*> &getNeighbors() const;Returns the set of all neighbor regions. A neighbor is any region that is touching this one. getBoundsLeftint getBoundsLeft() const;Returns the region's standard left boundry position, in pixels. This boundry only considers the full tiles that are part of this region. See also: Region::getBoundsTop, Region::getBoundsRight, Region::getBoundsBottom getBoundsTopint getBoundsTop() const;Returns the region's standard top boundry position, in pixels. This boundry only considers the full tiles that are part of this region. See also: Region::getBoundsLeft, Region::getBoundsRight, Region::getBoundsBottom getBoundsRightint getBoundsRight() const;Returns the region's standard right boundry position, in pixels. This boundry only considers the full tiles that are part of this region. See also: Region::getBoundsLeft, Region::getBoundsTop, Region::getBoundsBottom getBoundsBottomint getBoundsBottom() const;Returns the region's standard bottom boundry position, in pixels. This boundry only considers the full tiles that are part of this region. See also: Region::getBoundsLeft, Region::getBoundsTop, Region::getBoundsRight
getClosestAccessibleRegionRegion *getClosestAccessibleRegion() const;Retrieves the closest accessable neighbor region. See also: Region::getClosestInaccessibleRegion getClosestInaccessibleRegionRegion *getClosestInaccessibleRegion() const;Retrieves the closest inaccessable neighbor region. See also: Region::getClosestAccessibleRegion getDistanceint getDistance(BWAPI::Region *other) constRetrieves the distance between two region centers. | |
► Sign in to add a comment