18 #ifndef INCLUDED_ICMPRANGEMANAGER
19 #define INCLUDED_ICMPRANGEMANAGER
355 virtual void Verify() = 0;
360 #endif // INCLUDED_ICMPRANGEMANAGER
bool IsVisible_UncheckedRange(ssize_t i, ssize_t j)
Returns whether the given vertex is visible (i.e.
A simple fixed-point number class.
const CLosQuerier & operator=(const CLosQuerier &)
CLosQuerier(u32 playerMask, const std::vector< u32 > &data, ssize_t verticesPerSide)
virtual CLosQuerier GetLosQuerier(player_id_t player)=0
Returns a CLosQuerier for checking whether vertex positions are visible to the given player (or other...
virtual u8 GetEntityFlagMask(std::string identifier)=0
Returns the mask for the specified identifier.
ssize_t m_VerticesPerSide
virtual bool GetLosRevealAll(player_id_t player)=0
Returns whether the whole map has been made visible to the given player.
Object wrapping an entity_id_t, with a SEntityComponentCache to support fast QueryInterface() / CmpPt...
virtual u32 GetSharedLosMask(player_id_t player)=0
Returns shared LOS mask for player.
virtual void Verify()=0
Perform some internal consistency checks for testing/debugging.
Provides efficient range-based queries of the game world, and also LOS-based effects (fog of war)...
virtual void SetDebugOverlay(bool enabled)=0
Toggle the rendering of debug info.
virtual bool GetLosCircular()=0
Returns whether the LOS is restricted to a circular map.
virtual ELosVisibility GetLosVisibility(CEntityHandle ent, player_id_t player, bool forceRetainInFog=false)=0
Returns the visibility status of the given entity, with respect to the given player.
int32_t player_id_t
valid player IDs are non-negative (see ICmpOwnership)
virtual u8 GetPercentMapExplored(player_id_t player)=0
Get percent map explored statistics for specified player.
virtual std::vector< entity_id_t > ResetActiveQuery(tag_t tag)=0
Immediately execute a query, and re-enable it if disabled.
virtual void DisableActiveQuery(tag_t tag)=0
Disable the processing of a query (no RangeUpdate messages will be sent).
virtual void SetEntityFlag(entity_id_t ent, std::string identifier, bool value)=0
Set the flag specified by the identifier to the supplied value for the entity.
virtual tag_t CreateActiveParabolicQuery(entity_id_t source, entity_pos_t minRange, entity_pos_t maxRange, entity_pos_t elevationBonus, std::vector< int > owners, int requiredInterface, u8 flags)=0
Construct an active query of a paraboloic form around the unit.
Range manager implementation.
#define ENSURE(expr)
ensure the expression <expr> evaluates to non-zero.
virtual void SetLosRevealAll(player_id_t player, bool enabled)=0
Set whether the whole map should be made visible to the given player.
virtual entity_pos_t GetElevationAdaptedRange(CFixedVector3D pos, CFixedVector3D rot, entity_pos_t range, entity_pos_t elevationBonus, entity_pos_t angle)=0
Get the average elevation over 8 points on distance range around the entity.
bool IsExplored_UncheckedRange(ssize_t i, ssize_t j)
Returns whether the given vertex is explored (i.e.
#define DECLARE_INTERFACE_TYPE(iname)
virtual void SetLosCircular(bool enabled)=0
Set the LOS to be restricted to a circular map.
virtual std::vector< entity_id_t > GetEntitiesByPlayer(player_id_t player)=0
Returns list of all entities for specific player.
virtual std::vector< entity_id_t > ExecuteQuery(entity_id_t source, entity_pos_t minRange, entity_pos_t maxRange, std::vector< int > owners, int requiredInterface)=0
Execute a passive query.
bool IsVisible(ssize_t i, ssize_t j)
Returns whether the given vertex is visible (i.e.
bool IsExplored(ssize_t i, ssize_t j)
Returns whether the given vertex is explored (i.e.
friend class TestLOSTexture
virtual void SetSharedLos(player_id_t player, std::vector< player_id_t > players)=0
Sets shared LOS data for player to the given list of players.
Object providing efficient abstracted access to the LOS state.
virtual void EnableActiveQuery(tag_t tag)=0
Re-enable the processing of a query.
u32 entity_id_t
Entity ID type.
virtual tag_t CreateActiveQuery(entity_id_t source, entity_pos_t minRange, entity_pos_t maxRange, std::vector< int > owners, int requiredInterface, u8 flags)=0
Construct an active query.
u32 tag_t
External identifiers for active queries.
virtual void SetBounds(entity_pos_t x0, entity_pos_t z0, entity_pos_t x1, entity_pos_t z1, ssize_t vertices)=0
Set the bounds of the world.
virtual void DestroyActiveQuery(tag_t tag)=0
Destroy a query and clean up resources.
std::string GetLosVisibility_wrapper(entity_id_t ent, player_id_t player, bool forceRetainInFog)
GetLosVisibility wrapped for script calls.