Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/simulation2/components/ICmpRangeManager.h
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | |||||
* - units gathering from a resource that is exhausted need to find a new resource of the | * - units gathering from a resource that is exhausted need to find a new resource of the | ||||
* same type, near the old one and reachable. | * same type, near the old one and reachable. | ||||
* - projectile weapons with splash damage need to find all units within some distance | * - projectile weapons with splash damage need to find all units within some distance | ||||
* of the target point. | * of the target point. | ||||
* - ... | * - ... | ||||
* | * | ||||
* In most cases the users are event-based and want notifications when something | * In most cases the users are event-based and want notifications when something | ||||
* has entered or left the range, and the query can be set up once and rarely changed. | * has entered or left the range, and the query can be set up once and rarely changed. | ||||
* These queries have to be fast. It's fine to approximate an entity as a point. | * These queries have to be fast. Entities are approximated as circles. | ||||
* | * | ||||
* Current design: | * Current design: | ||||
* | * | ||||
* This class handles just the most common parts of range queries: | * This class handles just the most common parts of range queries: | ||||
* distance, target interface, and player ownership. | * distance, target interface, and player ownership. | ||||
* The caller can then apply any more complex filtering that it needs. | * The caller can then apply any more complex filtering that it needs. | ||||
* | * | ||||
* There are two types of query: | * There are two types of query: | ||||
▲ Show 20 Lines • Show All 280 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator