Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/components/ICmpObstructionManager.h
Show First 20 Lines • Show All 301 Lines • ▼ Show 20 Lines | public: | ||||
* obstruction square, filtering out using the given filter. | * obstruction square, filtering out using the given filter. | ||||
* @param square the Obstruction squre we want to compare with. | * @param square the Obstruction squre we want to compare with. | ||||
* @param out output list of obstructions | * @param out output list of obstructions | ||||
* @param filter filter for the obstructing units | * @param filter filter for the obstructing units | ||||
* @param strict whether to be strict in the check or more permissive (ie rasterize more or less). Default false. | * @param strict whether to be strict in the check or more permissive (ie rasterize more or less). Default false. | ||||
*/ | */ | ||||
virtual void GetUnitsOnObstruction(const ObstructionSquare& square, std::vector<entity_id_t>& out, const IObstructionTestFilter& filter, bool strict = false) const = 0; | virtual void GetUnitsOnObstruction(const ObstructionSquare& square, std::vector<entity_id_t>& out, const IObstructionTestFilter& filter, bool strict = false) const = 0; | ||||
/** | /** | ||||
* Prevent changes to the shapes - calls to GetObstructions will return the same results. | |||||
* (used for garanteeing that the simulation isn't changed when computing paths asynchronously). | |||||
*/ | |||||
virtual void LockObstructions() = 0; | |||||
virtual void UnlockObstructions() = 0; | |||||
vladislavbelov: It sounds like a workaround. Why it's not guaranteed by simulation manager then? | |||||
Done Inline ActionsThe problem is actually Atlas being threaded, which conceptually could change obstructions at any arbitrary time. That being said, this soon won't be a problem anymore. On the simulation side, this is guaranteed to not happen. wraitii: The problem is actually Atlas being threaded, which conceptually could change obstructions at… | |||||
/** | |||||
* Get the obstruction square representing the given shape. | * Get the obstruction square representing the given shape. | ||||
* @param tag tag of shape (must be valid) | * @param tag tag of shape (must be valid) | ||||
*/ | */ | ||||
virtual ObstructionSquare GetObstruction(tag_t tag) const = 0; | virtual ObstructionSquare GetObstruction(tag_t tag) const = 0; | ||||
virtual ObstructionSquare GetUnitShapeObstruction(entity_pos_t x, entity_pos_t z, entity_pos_t clearance) const = 0; | virtual ObstructionSquare GetUnitShapeObstruction(entity_pos_t x, entity_pos_t z, entity_pos_t clearance) const = 0; | ||||
virtual ObstructionSquare GetStaticShapeObstruction(entity_pos_t x, entity_pos_t z, entity_angle_t a, entity_pos_t w, entity_pos_t h) const = 0; | virtual ObstructionSquare GetStaticShapeObstruction(entity_pos_t x, entity_pos_t z, entity_angle_t a, entity_pos_t w, entity_pos_t h) const = 0; | ||||
▲ Show 20 Lines • Show All 227 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
It sounds like a workaround. Why it's not guaranteed by simulation manager then?