18#ifndef INCLUDED_ICMPPATHFINDER
19#define INCLUDED_ICMPPATHFINDER
31template<
typename T>
class Grid;
72 std::map<std::string, pass_class_t>& nonPathfindingPassClasses,
73 std::map<std::string, pass_class_t>& pathfindingPassClasses)
const = 0;
#define DECLARE_INTERFACE_TYPE(iname)
Definition: Interface.h:23
u16 pass_class_t
Definition: Pathfinding.h:29
A simple fixed-point number class.
Definition: Fixed.h:120
Basic 2D array, intended for storing tile data, plus support for lazy updates by ICmpObstructionManag...
Definition: Grid.h:38
EFoundationCheck
Definition: ICmpObstruction.h:33
Pathfinder algorithms.
Definition: ICmpPathfinder.h:60
virtual void FlushAIPathfinderDirtinessInformation()=0
virtual void SetDebugPath(entity_pos_t x0, entity_pos_t z0, const PathGoal &goal, pass_class_t passClass)=0
If the debug overlay is enabled, render the path that will computed by ComputePath.
virtual ICmpObstruction::EFoundationCheck CheckBuildingPlacement(const IObstructionTestFilter &filter, entity_pos_t x, entity_pos_t z, entity_pos_t a, entity_pos_t w, entity_pos_t h, entity_id_t id, pass_class_t passClass, bool onlyCenterPoint) const =0
Check whether a building placed here is valid and doesn't hit any obstructions or impassable terrain.
virtual void GetDebugData(u32 &steps, double &time, Grid< u8 > &grid) const =0
Returns some stats about the last ComputePath.
virtual bool CheckMovement(const IObstructionTestFilter &filter, entity_pos_t x0, entity_pos_t z0, entity_pos_t x1, entity_pos_t z1, entity_pos_t r, pass_class_t passClass) const =0
Check whether the given movement line is valid and doesn't hit any obstructions or impassable terrain...
virtual WaypointPath ComputeShortPathImmediate(const ShortPathRequest &request) const =0
virtual u32 ComputePathAsync(entity_pos_t x0, entity_pos_t z0, const PathGoal &goal, pass_class_t passClass, entity_id_t notify)=0
Asynchronous version of ComputePath.
virtual bool IsGoalReachable(entity_pos_t x0, entity_pos_t z0, const PathGoal &goal, pass_class_t passClass)=0
virtual const GridUpdateInformation & GetAIPathfinderDirtinessInformation() const =0
Get the accumulated dirtiness information since the last time the AI accessed and flushed it.
virtual void SetDebugOverlay(bool enabled)=0
Toggle the storage and rendering of debug info.
virtual entity_pos_t GetMaximumClearance() const =0
Get the larger clearance in all passability classes.
virtual void SetHierDebugOverlay(bool enabled)=0
Toggle the storage and rendering of debug info for the hierarchical pathfinder.
virtual ICmpObstruction::EFoundationCheck CheckBuildingPlacement(const IObstructionTestFilter &filter, entity_pos_t x, entity_pos_t z, entity_pos_t a, entity_pos_t w, entity_pos_t h, entity_id_t id, pass_class_t passClass) const =0
Check whether a building placed here is valid and doesn't hit any obstructions or impassable terrain.
virtual const Grid< NavcellData > & GetPassabilityGrid()=0
virtual void SetAtlasOverlay(bool enable, pass_class_t passClass=0)=0
Sets up the pathfinder passability overlay in Atlas.
virtual void GetPassabilityClasses(std::map< std::string, pass_class_t > &nonPathfindingPassClasses, std::map< std::string, pass_class_t > &pathfindingPassClasses) const =0
Get the list of passability classes, separating pathfinding classes and others.
virtual pass_class_t GetPassabilityClass(const std::string &name) const =0
Get the tag for a given passability class name.
virtual entity_pos_t GetClearance(pass_class_t passClass) const =0
virtual u32 ComputeShortPathAsync(entity_pos_t x0, entity_pos_t z0, entity_pos_t clearance, entity_pos_t range, const PathGoal &goal, pass_class_t passClass, bool avoidMovingUnits, entity_id_t controller, entity_id_t notify)=0
Request a short path computation, asynchronously.
virtual void SendRequestedPaths()=0
Finish computing asynchronous path requests and send the CMessagePathResult messages.
virtual Grid< u16 > ComputeShoreGrid(bool expandOnWater=false)=0
Get a grid representing the distance to the shore of the terrain tile.
virtual void StartProcessingMoves(bool useMax)=0
Tell asynchronous pathfinder threads that they can begin computing paths.
virtual void UpdateGrid()=0
Regenerates the grid based on the current obstruction list, if necessary.
virtual void GetPassabilityClasses(std::map< std::string, pass_class_t > &passClasses) const =0
Get the list of all known passability classes.
virtual ICmpObstruction::EFoundationCheck CheckUnitPlacement(const IObstructionTestFilter &filter, entity_pos_t x, entity_pos_t z, entity_pos_t r, pass_class_t passClass, bool onlyCenterPoint=false) const =0
Check whether a unit placed here is valid and doesn't hit any obstructions or impassable terrain.
virtual void ComputePathImmediate(entity_pos_t x0, entity_pos_t z0, const PathGoal &goal, pass_class_t passClass, WaypointPath &ret) const =0
Definition: IComponent.h:33
Interface for ICmpObstructionManager Test functions to filter out unwanted shapes.
Definition: ICmpObstructionManager.h:352
Pathfinder goal.
Definition: PathGoal.h:33
u32 entity_id_t
Entity ID type.
Definition: Entity.h:29
Definition: ICmpPathfinder.h:37
PathResult(u32 t, entity_id_t n, WaypointPath p)
Definition: ICmpPathfinder.h:39
entity_id_t notify
Definition: ICmpPathfinder.h:42
WaypointPath path
Definition: ICmpPathfinder.h:43
u32 ticket
Definition: ICmpPathfinder.h:41
Definition: Pathfinding.h:44
Returned path.
Definition: Pathfinding.h:67
uint32_t u32
Definition: types.h:39