Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/components/ICmpObstructionManager.h
Show First 20 Lines • Show All 195 Lines • ▼ Show 20 Lines | public: | ||||
/** | /** | ||||
* Calculate the largest straight line distance between the source and the target | * Calculate the largest straight line distance between the source and the target | ||||
*/ | */ | ||||
virtual fixed MaxDistanceBetweenShapes(const ObstructionSquare& source, const ObstructionSquare& target) const = 0; | virtual fixed MaxDistanceBetweenShapes(const ObstructionSquare& source, const ObstructionSquare& target) const = 0; | ||||
/** | /** | ||||
* Check if the given entity is in range of the other point given those parameters. | * Check if the given entity is in range of the other point given those parameters. | ||||
* @param maxRange - if -1, treated as infinite. | |||||
*/ | */ | ||||
virtual bool IsInPointRange(entity_id_t ent, entity_pos_t px, entity_pos_t pz, entity_pos_t minRange, entity_pos_t maxRange, bool opposite) const = 0; | virtual bool IsInPointRange(entity_id_t ent, entity_pos_t px, entity_pos_t pz, entity_pos_t minRange, entity_pos_t maxRange, bool opposite) const = 0; | ||||
/** | /** | ||||
* Check if the given entity is in range of the target given those parameters. | * Check if the given entity is in range of the target given those parameters. | ||||
* @param maxRange - if -1, treated as infinite. | |||||
*/ | */ | ||||
virtual bool IsInTargetRange(entity_id_t ent, entity_id_t target, entity_pos_t minRange, entity_pos_t maxRange, bool opposite) const = 0; | virtual bool IsInTargetRange(entity_id_t ent, entity_id_t target, entity_pos_t minRange, entity_pos_t maxRange, bool opposite) const = 0; | ||||
/** | /** | ||||
* Check if the given point is in range of the other point given those parameters. | * Check if the given point is in range of the other point given those parameters. | ||||
* @param maxRange - if -1, treated as infinite. | |||||
*/ | */ | ||||
virtual bool IsPointInPointRange(entity_pos_t x, entity_pos_t z, entity_pos_t px, entity_pos_t pz, entity_pos_t minRange, entity_pos_t maxRange) const = 0; | virtual bool IsPointInPointRange(entity_pos_t x, entity_pos_t z, entity_pos_t px, entity_pos_t pz, entity_pos_t minRange, entity_pos_t maxRange) const = 0; | ||||
/** | /** | ||||
* Collision test a flat-ended thick line against the current set of shapes. | * Collision test a flat-ended thick line against the current set of shapes. | ||||
* The line caps extend by @p r beyond the end points. | * The line caps extend by @p r beyond the end points. | ||||
* Only intersections going from outside to inside a shape are counted. | * Only intersections going from outside to inside a shape are counted. | ||||
* @param filter filter to restrict the shapes that are counted | * @param filter filter to restrict the shapes that are counted | ||||
▲ Show 20 Lines • Show All 315 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator