18 #ifndef INCLUDED_ICMPPATHFINDER 19 #define INCLUDED_ICMPPATHFINDER 34 template<
typename T>
class Grid;
62 std::map<std::string, pass_class_t>& nonPathfindingPassClasses,
63 std::map<std::string, pass_class_t>& pathfindingPassClasses)
const = 0;
199 #endif // INCLUDED_ICMPPATHFINDER Definition: IComponent.h:33
A simple fixed-point number class.
Definition: Fixed.h:115
Interface for ICmpObstructionManager Test functions to filter out unwanted shapes.
Definition: ICmpObstructionManager.h:282
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.
u16 pass_class_t
Definition: Pathfinding.h:29
virtual Grid< u16 > ComputeShoreGrid(bool expandOnWater=false)=0
Get a grid representing the distance to the shore of the terrain tile.
virtual pass_class_t GetPassabilityClass(const std::string &name) const =0
Get the tag for a given passability class name.
virtual void SetAtlasOverlay(bool enable, pass_class_t passClass=0)=0
Sets up the pathfinder passability overlay in Atlas.
Returned path.
Definition: Pathfinding.h:40
virtual void ProcessSameTurnMoves()=0
Process moves during the same turn they were created in to improve responsiveness.
virtual void FinishAsyncRequests()=0
Finish computing asynchronous path requests and send the CMessagePathResult messages.
virtual void SetHierDebugOverlay(bool enabled)=0
Toggle the storage and rendering of debug info for the hierarchical pathfinder.
virtual entity_pos_t GetMaximumClearance() const =0
Get the larger clearance in all passability classes.
Pathfinder goal.
Definition: PathGoal.h:32
Basic 2D array, intended for storing tile data, plus support for lazy updates by ICmpObstructionManag...
Definition: ICmpPathfinder.h:34
EFoundationCheck
Definition: ICmpObstruction.h:33
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...
Pathfinder algorithms.
Definition: ICmpPathfinder.h:49
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 group, entity_id_t notify)=0
Asynchronous version of ComputeShortPath (using ControlGroupObstructionFilter).
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.
uint32_t u32
Definition: types.h:39
virtual void ComputePath(entity_pos_t x0, entity_pos_t z0, const PathGoal &goal, pass_class_t passClass, WaypointPath &ret)=0
Compute a tile-based path from the given point to the goal, and return the set of waypoints...
#define DECLARE_INTERFACE_TYPE(iname)
Definition: Interface.h:23
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 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 const Grid< NavcellData > & GetPassabilityGrid()=0
virtual void ComputeShortPath(const IObstructionTestFilter &filter, entity_pos_t x0, entity_pos_t z0, entity_pos_t clearance, entity_pos_t range, const PathGoal &goal, pass_class_t passClass, WaypointPath &ret)=0
Compute a precise path from the given point to the goal, and return the set of waypoints.
virtual entity_pos_t GetClearance(pass_class_t passClass) const =0
virtual void GetPassabilityClasses(std::map< std::string, pass_class_t > &passClasses) const =0
Get the list of all known passability classes.
virtual void UpdateGrid()=0
Regenerates the grid based on the current obstruction list, if necessary.
virtual void SetDebugOverlay(bool enabled)=0
Toggle the storage and rendering of debug info.
virtual void GetDebugData(u32 &steps, double &time, Grid< u8 > &grid) const =0
Returns some stats about the last ComputePath.
u32 entity_id_t
Entity ID type.
Definition: Entity.h:23
virtual const GridUpdateInformation & GetDirtinessData() const =0
Passes the lazily-stored dirtiness data collected from the obstruction manager during the previous gr...