Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/components/ICmpObstructionManager.h
Show First 20 Lines • Show All 159 Lines • ▼ Show 20 Lines | public: | ||||
virtual void RemoveShape(tag_t tag) = 0; | virtual void RemoveShape(tag_t tag) = 0; | ||||
/** | /** | ||||
* Returns the distance from the obstruction to the point (px, pz), or -1 if the entity is out of the world. | * Returns the distance from the obstruction to the point (px, pz), or -1 if the entity is out of the world. | ||||
*/ | */ | ||||
virtual fixed DistanceToPoint(entity_id_t ent, entity_pos_t px, entity_pos_t pz) const = 0; | virtual fixed DistanceToPoint(entity_id_t ent, entity_pos_t px, entity_pos_t pz) const = 0; | ||||
/** | /** | ||||
* Calculate the largest straight line distance between the entity and the point. | |||||
*/ | |||||
virtual fixed MaxDistanceToPoint(entity_id_t ent, entity_pos_t px, entity_pos_t pz) const = 0; | |||||
/** | |||||
* Calculate the shortest distance between the entity and the target. | |||||
*/ | |||||
virtual fixed DistanceToTarget(entity_id_t ent, entity_id_t target) const = 0; | |||||
/** | |||||
* Calculate the largest straight line distance between the entity and the target. | |||||
*/ | |||||
virtual fixed MaxDistanceToTarget(entity_id_t ent, entity_id_t target) const = 0; | |||||
/** | |||||
* Check if the given entity is in range of the other point given those parameters. | |||||
*/ | |||||
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. | |||||
*/ | |||||
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. | |||||
*/ | |||||
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 | ||||
* @param x0 X coordinate of line's first point | * @param x0 X coordinate of line's first point | ||||
* @param z0 Z coordinate of line's first point | * @param z0 Z coordinate of line's first point | ||||
* @param x1 X coordinate of line's second point | * @param x1 X coordinate of line's second point | ||||
* @param z1 Z coordinate of line's second point | * @param z1 Z coordinate of line's second point | ||||
▲ Show 20 Lines • Show All 321 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator