Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/components/ICmpRangeManager.h
Show First 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | public: | ||||
* @return pointer to spatial subdivision structure. | * @return pointer to spatial subdivision structure. | ||||
*/ | */ | ||||
virtual FastSpatialSubdivision* GetSubdivision() = 0; | virtual FastSpatialSubdivision* GetSubdivision() = 0; | ||||
/** | /** | ||||
* Set the bounds of the world. | * Set the bounds of the world. | ||||
* Entities should not be outside the bounds (else efficiency will suffer). | * Entities should not be outside the bounds (else efficiency will suffer). | ||||
* @param x0,z0,x1,z1 Coordinates of the corners of the world | * @param x0,z0,x1,z1 Coordinates of the corners of the world | ||||
* @param vertices Number of terrain vertices per side | |||||
*/ | */ | ||||
virtual void SetBounds(entity_pos_t x0, entity_pos_t z0, entity_pos_t x1, entity_pos_t z1, ssize_t vertices) = 0; | virtual void SetBounds(entity_pos_t x0, entity_pos_t z0, entity_pos_t x1, entity_pos_t z1) = 0; | ||||
/** | /** | ||||
* Execute a passive query. | * Execute a passive query. | ||||
* @param source the entity around which the range will be computed. | * @param source the entity around which the range will be computed. | ||||
* @param minRange non-negative minimum distance in metres (inclusive). | * @param minRange non-negative minimum distance in metres (inclusive). | ||||
* @param maxRange non-negative maximum distance in metres (inclusive); or -1.0 to ignore distance. | * @param maxRange non-negative maximum distance in metres (inclusive); or -1.0 to ignore distance. | ||||
* @param owners list of player IDs that matching entities may have; -1 matches entities with no owner. | * @param owners list of player IDs that matching entities may have; -1 matches entities with no owner. | ||||
* @param requiredInterface if non-zero, an interface ID that matching entities must implement. | * @param requiredInterface if non-zero, an interface ID that matching entities must implement. | ||||
▲ Show 20 Lines • Show All 228 Lines • ▼ Show 20 Lines | public: | ||||
virtual u8 GetPercentMapExplored(player_id_t player) const = 0; | virtual u8 GetPercentMapExplored(player_id_t player) const = 0; | ||||
/** | /** | ||||
* Get percent map explored statistics for specified set of players. | * Get percent map explored statistics for specified set of players. | ||||
* Note: this function computes statistics from scratch and should not be called too often. | * Note: this function computes statistics from scratch and should not be called too often. | ||||
*/ | */ | ||||
virtual u8 GetUnionPercentMapExplored(const std::vector<player_id_t>& players) const = 0; | virtual u8 GetUnionPercentMapExplored(const std::vector<player_id_t>& players) const = 0; | ||||
/** | |||||
* @return The number of LOS vertices. | |||||
*/ | |||||
virtual size_t GetVerticesPerSide() const = 0; | |||||
Stan: i32 | |||||
/** | /** | ||||
* Perform some internal consistency checks for testing/debugging. | * Perform some internal consistency checks for testing/debugging. | ||||
*/ | */ | ||||
virtual void Verify() = 0; | virtual void Verify() = 0; | ||||
DECLARE_INTERFACE_TYPE(RangeManager) | DECLARE_INTERFACE_TYPE(RangeManager) | ||||
}; | }; | ||||
#endif // INCLUDED_ICMPRANGEMANAGER | #endif // INCLUDED_ICMPRANGEMANAGER |
Wildfire Games · Phabricator
i32