18 #ifndef INCLUDED_ICMPPATHFINDER
19 #define INCLUDED_ICMPPATHFINDER
33 template<
typename T>
class Grid;
206 #endif // INCLUDED_ICMPPATHFINDER
virtual pass_class_t GetPassabilityClass(const std::string &name)=0
Get the tag for a given passability class name.
virtual std::map< std::string, pass_class_t > GetPassabilityClasses()=0
Get the list of all known passability classes.
A simple fixed-point number class.
Interface for ICmpObstructionManager Test functions to filter out unwanted shapes.
virtual const Grid< u16 > & GetPassabilityGrid()=0
virtual u32 ComputeShortPathAsync(entity_pos_t x0, entity_pos_t z0, entity_pos_t r, entity_pos_t range, const Goal &goal, pass_class_t passClass, bool avoidMovingUnits, entity_id_t group, entity_id_t notify)=0
Asynchronous version of ComputeShortPath (using ControlGroupObstructionFilter).
virtual void ProcessSameTurnMoves()=0
Process moves during the same turn they were created in to improve responsiveness.
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)=0
Check whether a building placed here is valid and doesn't hit any obstructions or impassable terrain...
virtual void FinishAsyncRequests()=0
Finish computing asynchronous path requests and send the CMessagePathResult messages.
virtual fixed GetMovementSpeed(entity_pos_t x0, entity_pos_t z0, cost_class_t costClass)=0
Find the speed factor (typically around 1.0) for a unit of the given cost class at the given position...
std::vector< Waypoint > m_Waypoints
virtual cost_class_t GetCostClass(const std::string &name)=0
Get the tag for a given movement cost class name.
Basic 2D array, intended for storing tile data, plus support for lazy updates by ICmpObstructionManag...
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)=0
Check whether the given movement line is valid and doesn't hit any obstructions or impassable terrain...
virtual ICmpObstruction::EFoundationCheck CheckUnitPlacement(const IObstructionTestFilter &filter, entity_pos_t x, entity_pos_t z, entity_pos_t r, pass_class_t passClass)=0
Check whether a unit placed here is valid and doesn't hit any obstructions or impassable terrain...
#define DECLARE_INTERFACE_TYPE(iname)
virtual u32 ComputePathAsync(entity_pos_t x0, entity_pos_t z0, const Goal &goal, pass_class_t passClass, cost_class_t costClass, entity_id_t notify)=0
Asynchronous version of ComputePath.
virtual void SetDebugPath(entity_pos_t x0, entity_pos_t z0, const Goal &goal, pass_class_t passClass, cost_class_t costClass)=0
If the debug overlay is enabled, render the path that will computed by ComputePath.
enum ICmpPathfinder::Goal::Type type
virtual void ComputePath(entity_pos_t x0, entity_pos_t z0, const Goal &goal, pass_class_t passClass, cost_class_t costClass, Path &ret)=0
Compute a tile-based path from the given point to the goal, and return the set of waypoints...
virtual void ComputeShortPath(const IObstructionTestFilter &filter, entity_pos_t x0, entity_pos_t z0, entity_pos_t r, entity_pos_t range, const Goal &goal, pass_class_t passClass, Path &ret)=0
Compute a precise path from the given point to the goal, and return the set of waypoints.
virtual void SetDebugOverlay(bool enabled)=0
Toggle the storage and rendering of debug info.
virtual CFixedVector2D GetNearestPointOnGoal(CFixedVector2D pos, const Goal &goal)=0
Returns the coordinates of the point on the goal that is closest to pos in a straight line...
u32 entity_id_t
Entity ID type.