AlpacaLibary
1.63
A closed source C++ bot for OSRS
|
A class allowing easy pathfinding within the local region. More...
Classes | |
class | TileNode |
A subclass used to store information about tile nodes generated by the Pathfinding class. More... | |
Typedefs | |
typedef enum Pathfinding::PATHFINDER | PATHFINDER |
Enumerations | |
enum | COLLISION_FLAG { OPEN = 0 , CLOSED = 0xFFFFFF , UNINITIALIZED = 0x1000000 , OCCUPIED = 0x100 , SOLID = 0x20000 , BLOCKED = 0x200000 , NORTH = 0x2 , EAST = 0x8 , SOUTH = 0x20 , WEST = 0x80 , NORTHEAST = 0x4 , SOUTHEAST = 0x10 , SOUTHWEST = 0x40 , NORTHWEST = 0x1 } |
enum | PATHFINDER { BREADTH_FIRST_SEARCH } |
enum | PATHFIND_OPTION { CHECK_COLLISION = (1 << 1) , CHECK_WHITELIST = (1 << 2) , CHECK_BLACKLIST = (1 << 3) , GOAL_IS_LOCAL = (1 << 4) , RETURN_LOCAL = (1 << 5) } |
Functions | |
std::int32_t | GetCurrentRegion () |
Returns the region ID the local player is in. More... | |
void | GenerateNodes () |
Clears the internal cached nodes, and generates new ones based on the local region More... | |
void | SetWhitelist (const std::vector< Tile > &W) |
Sets the internal Whitelist tiles. More... | |
void | SetBlacklist (const std::vector< Tile > &B) |
Sets the internal Blacklist tiles. More... | |
std::vector< std::vector< TileNode > > | GetNodes () |
Returns the internal TileNode cache generated by GenerateNodes() More... | |
std::vector< Tile > | GetWhitelist () |
Returns the internal Whitelist cache. More... | |
std::vector< Tile > | GetBlacklist () |
Returns the internal Blacklist cache. More... | |
Tile | FindWalkableTile (const Tile &T) |
Tile | FindWalkableTile (const Tile &T, const Tile &Min, const Tile &Max) |
std::vector< Tile > | FindWalkableTiles (const Tile &T) |
std::vector< Tile > | FindWalkableTiles (const Tile &T, const Tile &Min, const Tile &Max) |
std::vector< Tile > | FindPathTo (const Tile &Goal, std::int32_t Options=CHECK_COLLISION|CHECK_WHITELIST|CHECK_BLACKLIST, PATHFINDER Finder=BREADTH_FIRST_SEARCH) |
std::vector< Tile > | FindPathTo (const std::vector< Tile > &Goals, std::int32_t Options=CHECK_COLLISION|CHECK_WHITELIST|CHECK_BLACKLIST, PATHFINDER Finder=BREADTH_FIRST_SEARCH) |
std::vector< Pathfinding::TileNode > | FindNodePathTo (const Tile &Goal, std::int32_t Options=CHECK_COLLISION|CHECK_WHITELIST|CHECK_BLACKLIST, PATHFINDER Finder=BREADTH_FIRST_SEARCH) |
std::vector< Pathfinding::TileNode > | FindNodePathTo (const std::vector< Tile > &Goals, std::int32_t Options=CHECK_COLLISION|CHECK_WHITELIST|CHECK_BLACKLIST, PATHFINDER Finder=BREADTH_FIRST_SEARCH) |
bool | IsInside (std::int32_t X, std::int32_t Y) |
std::vector< Pathfinding::TileNode * > | GetNeighborsTo (std::int32_t X, std::int32_t Y, bool CheckCollision=true) |
std::vector< Pathfinding::TileNode > | Finder_BFS (std::uint32_t StartX, std::uint32_t StartY, std::uint32_t EndX, std::uint32_t EndY, std::int32_t Options) |
std::vector< Pathfinding::TileNode > | Finder_BFS (std::uint32_t StartX, std::uint32_t StartY, const std::vector< std::pair< std::uint32_t, std::uint32_t >> &Ends, std::int32_t Options) |
A class allowing easy pathfinding within the local region.
typedef enum Pathfinding::PATHFINDER Pathfinding::PATHFINDER |
Enumerator | |
---|---|
OPEN | |
CLOSED | |
UNINITIALIZED | |
OCCUPIED | |
SOLID | |
BLOCKED | |
NORTH | |
EAST | |
SOUTH | |
WEST | |
NORTHEAST | |
SOUTHEAST | |
SOUTHWEST | |
NORTHWEST |
Definition at line 13 of file Pathfinding.hpp.
Definition at line 39 of file Pathfinding.hpp.
Enumerator | |
---|---|
BREADTH_FIRST_SEARCH |
Definition at line 33 of file Pathfinding.hpp.
std::vector<Pathfinding::TileNode> Pathfinding::Finder_BFS | ( | std::uint32_t | StartX, |
std::uint32_t | StartY, | ||
const std::vector< std::pair< std::uint32_t, std::uint32_t >> & | Ends, | ||
std::int32_t | Options | ||
) |
std::vector<Pathfinding::TileNode> Pathfinding::Finder_BFS | ( | std::uint32_t | StartX, |
std::uint32_t | StartY, | ||
std::uint32_t | EndX, | ||
std::uint32_t | EndY, | ||
std::int32_t | Options | ||
) |
std::vector<Pathfinding::TileNode> Pathfinding::FindNodePathTo | ( | const std::vector< Tile > & | Goals, |
std::int32_t | Options = CHECK_COLLISION|CHECK_WHITELIST|CHECK_BLACKLIST , |
||
PATHFINDER | Finder = BREADTH_FIRST_SEARCH |
||
) |
std::vector<Pathfinding::TileNode> Pathfinding::FindNodePathTo | ( | const Tile & | Goal, |
std::int32_t | Options = CHECK_COLLISION|CHECK_WHITELIST|CHECK_BLACKLIST , |
||
PATHFINDER | Finder = BREADTH_FIRST_SEARCH |
||
) |
std::vector<Tile> Pathfinding::FindPathTo | ( | const std::vector< Tile > & | Goals, |
std::int32_t | Options = CHECK_COLLISION|CHECK_WHITELIST|CHECK_BLACKLIST , |
||
PATHFINDER | Finder = BREADTH_FIRST_SEARCH |
||
) |
std::vector<Tile> Pathfinding::FindPathTo | ( | const Tile & | Goal, |
std::int32_t | Options = CHECK_COLLISION|CHECK_WHITELIST|CHECK_BLACKLIST , |
||
PATHFINDER | Finder = BREADTH_FIRST_SEARCH |
||
) |
std::vector<Tile> Pathfinding::FindWalkableTiles | ( | const Tile & | T, |
const Tile & | Min, | ||
const Tile & | Max | ||
) |
void Pathfinding::GenerateNodes | ( | ) |
Clears the internal cached nodes, and generates new ones based on the local region
std::vector<Tile> Pathfinding::GetBlacklist | ( | ) |
Returns the internal Blacklist cache.
std::int32_t Pathfinding::GetCurrentRegion | ( | ) |
Returns the region ID the local player is in.
std::vector<Pathfinding::TileNode*> Pathfinding::GetNeighborsTo | ( | std::int32_t | X, |
std::int32_t | Y, | ||
bool | CheckCollision = true |
||
) |
std::vector<std::vector<TileNode> > Pathfinding::GetNodes | ( | ) |
Returns the internal TileNode cache generated by GenerateNodes()
std::vector<Tile> Pathfinding::GetWhitelist | ( | ) |
Returns the internal Whitelist cache.
bool Pathfinding::IsInside | ( | std::int32_t | X, |
std::int32_t | Y | ||
) |
void Pathfinding::SetBlacklist | ( | const std::vector< Tile > & | B | ) |
Sets the internal Blacklist tiles.
void Pathfinding::SetWhitelist | ( | const std::vector< Tile > & | W | ) |
Sets the internal Whitelist tiles.