Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/components/ICmpPathfinder.h
/* Copyright (C) 2019 Wildfire Games. | /* Copyright (C) 2019 Wildfire Games. | ||||
wraitii: Wanted to try that out. | |||||
* This file is part of 0 A.D. | * This file is part of 0 A.D. | ||||
* | * | ||||
* 0 A.D. is free software: you can redistribute it and/or modify | * 0 A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0 A.D. is distributed in the hope that it will be useful, | * 0 A.D. is distributed in the hope that it will be useful, | ||||
▲ Show 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | virtual void GetPassabilityClasses( | ||||
std::map<std::string, pass_class_t>& pathfindingPassClasses) const = 0; | std::map<std::string, pass_class_t>& pathfindingPassClasses) const = 0; | ||||
/** | /** | ||||
* Get the tag for a given passability class name. | * Get the tag for a given passability class name. | ||||
* Logs an error and returns something acceptable if the name is unrecognised. | * Logs an error and returns something acceptable if the name is unrecognised. | ||||
*/ | */ | ||||
virtual pass_class_t GetPassabilityClass(const std::string& name) const = 0; | virtual pass_class_t GetPassabilityClass(const std::string& name) const = 0; | ||||
/** | |||||
* Assuming the entity is a ship, returns true if near shore. | |||||
*/ | |||||
virtual bool CheckNearShore(entity_id_t ship, entity_id_t landUnit, fixed pickupRange) const = 0; | |||||
virtual entity_pos_t GetClearance(pass_class_t passClass) const = 0; | virtual entity_pos_t GetClearance(pass_class_t passClass) const = 0; | ||||
/** | /** | ||||
* Get the larger clearance in all passability classes. | * Get the larger clearance in all passability classes. | ||||
*/ | */ | ||||
virtual entity_pos_t GetMaximumClearance() const = 0; | virtual entity_pos_t GetMaximumClearance() const = 0; | ||||
virtual const Grid<NavcellData>& GetPassabilityGrid() = 0; | virtual const Grid<NavcellData>& GetPassabilityGrid() = 0; | ||||
▲ Show 20 Lines • Show All 117 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Wanted to try that out.