Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/components/ICmpPathfinder.h
Show First 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | public: | ||||
virtual void FlushAIPathfinderDirtinessInformation() = 0; | virtual void FlushAIPathfinderDirtinessInformation() = 0; | ||||
/** | /** | ||||
* Get a grid representing the distance to the shore of the terrain tile. | * Get a grid representing the distance to the shore of the terrain tile. | ||||
*/ | */ | ||||
virtual Grid<u16> ComputeShoreGrid(bool expandOnWater = false) = 0; | virtual Grid<u16> ComputeShoreGrid(bool expandOnWater = false) = 0; | ||||
/** | /** | ||||
* Transform an arbitrary PathGoal into a reachable Point PathGoal, see Hierarchical Pathfinder for details | |||||
* Return true if the goal was reachable originally, false otherwise. | |||||
*/ | |||||
virtual bool MakeGoalReachable(entity_pos_t x0, entity_pos_t z0, PathGoal &goal, pass_class_t passClass) = 0; | |||||
/** | |||||
* Gives the closest passable navcell from the given position. | |||||
* Returns how many navcells away (manhattan) that navcell is. | |||||
*/ | |||||
virtual u32 FindNearestPassableNavcell(entity_pos_t x, entity_pos_t z, u16& outI, u16& outJ, pass_class_t passClass) = 0; | |||||
/** | |||||
* Returns true if navcell (i0, j0) has the same global region ID as navcell (i1, j1). | |||||
* i.e. you can reach one from the other. | |||||
*/ | |||||
virtual bool NavcellIsReachable(u16 i0, u16 j0, u16 i1, u16 j1, pass_class_t passClass) = 0; | |||||
/** | |||||
* Compute a tile-based path from the given point to the goal, and return the set of waypoints. | * Compute a tile-based path from the given point to the goal, and return the set of waypoints. | ||||
* The waypoints correspond to the centers of horizontally/vertically adjacent tiles | * The waypoints correspond to the centers of horizontally/vertically adjacent tiles | ||||
* along the path. | * along the path. | ||||
*/ | */ | ||||
virtual void ComputePath(entity_pos_t x0, entity_pos_t z0, const PathGoal& goal, pass_class_t passClass, WaypointPath& ret) = 0; | virtual void ComputePath(entity_pos_t x0, entity_pos_t z0, const PathGoal& goal, pass_class_t passClass, WaypointPath& ret) = 0; | ||||
/** | /** | ||||
* Asynchronous version of ComputePath. | * Asynchronous version of ComputePath. | ||||
▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator