18 #ifndef INCLUDED_ICMPRANGEMANAGER 19 #define INCLUDED_ICMPRANGEMANAGER 421 virtual void Verify() = 0;
426 #endif // INCLUDED_ICMPRANGEMANAGER Definition: IComponent.h:33
virtual tag_t CreateActiveParabolicQuery(entity_id_t source, entity_pos_t minRange, entity_pos_t maxRange, entity_pos_t elevationBonus, const std::vector< int > &owners, int requiredInterface, u8 flags)=0
Construct an active query of a paraboloic form around the unit.
virtual FastSpatialSubdivision * GetSubdivision()=0
Access the spatial subdivision kept by the range manager.
A simple fixed-point number class.
Definition: Fixed.h:115
const CLosQuerier & operator=(const CLosQuerier &)
CLosQuerier(u32 playerMask, const std::vector< u32 > &data, ssize_t verticesPerSide)
Definition: ICmpRangeManager.h:248
Definition: FixedVector2D.h:24
virtual void ExploreTerritories()=0
Explore the tiles inside each player's territory.
virtual u32 GetSharedLosMask(player_id_t player) const =0
Returns shared LOS mask for player.
virtual entity_pos_t GetElevationAdaptedRange(const CFixedVector3D &pos, const CFixedVector3D &rot, entity_pos_t range, entity_pos_t elevationBonus, entity_pos_t angle) const =0
Get the average elevation over 8 points on distance range around the entity.
ssize_t m_VerticesPerSide
Definition: ICmpRangeManager.h:321
virtual void ActivateScriptedVisibility(entity_id_t ent, bool status)=0
Toggle the scripted Visibility component activation for entity ent.
Definition: ICmpRangeManager.h:232
Object wrapping an entity_id_t, with a SEntityComponentCache to support fast QueryInterface() / CmpPt...
Definition: Entity.h:79
virtual void Verify()=0
Perform some internal consistency checks for testing/debugging.
bool IsExplored_UncheckedRange(ssize_t i, ssize_t j) const
Returns whether the given vertex is explored (i.e.
Definition: ICmpRangeManager.h:306
virtual ELosVisibility GetLosVisibility(CEntityHandle ent, player_id_t player) const =0
Returns the visibility status of the given entity, with respect to the given player.
Provides efficient range-based queries of the game world, and also LOS-based effects (fog of war)...
Definition: ICmpRangeManager.h:69
virtual u8 GetUnionPercentMapExplored(const std::vector< player_id_t > &players) const =0
Get percent map explored statistics for specified set of players.
virtual u8 GetEntityFlagMask(const std::string &identifier) const =0
Returns the mask for the specified identifier.
Definition: ICmpRangeManager.h:233
virtual void SetDebugOverlay(bool enabled)=0
Toggle the rendering of debug info.
uint8_t u8
Definition: types.h:37
bool IsExplored(ssize_t i, ssize_t j) const
Returns whether the given vertex is explored (i.e.
Definition: ICmpRangeManager.h:274
virtual tag_t CreateActiveQuery(entity_id_t source, entity_pos_t minRange, entity_pos_t maxRange, const std::vector< int > &owners, int requiredInterface, u8 flags)=0
Construct an active query.
int32_t player_id_t
valid player IDs are non-negative (see ICmpOwnership)
Definition: Player.h:24
virtual std::vector< entity_id_t > ResetActiveQuery(tag_t tag)=0
Immediately execute a query, and re-enable it if disabled.
Definition: ICmpRangeManager.h:223
virtual CLosQuerier GetLosQuerier(player_id_t player) const =0
Returns a CLosQuerier for checking whether vertex positions are visible to the given player (or other...
virtual void DisableActiveQuery(tag_t tag)=0
Disable the processing of a query (no RangeUpdate messages will be sent).
ELosState
Definition: ICmpRangeManager.h:221
Definition: ICmpRangeManager.h:225
Range manager implementation.
Definition: CCmpRangeManager.cpp:332
#define ENSURE(expr)
ensure the expression <expr> evaluates to non-zero.
Definition: debug.h:287
virtual void SetLosRevealAll(player_id_t player, bool enabled)=0
Set whether the whole map should be made visible to the given player.
uint32_t u32
Definition: types.h:39
u32 m_PlayerMask
Definition: ICmpRangeManager.h:319
virtual bool GetLosRevealAll(player_id_t player) const =0
Returns whether the whole map has been made visible to the given player.
virtual void SetEntityFlag(entity_id_t ent, const std::string &identifier, bool value)=0
Set the flag specified by the identifier to the supplied value for the entity.
A basic square subdivision scheme for finding entities in range More efficient than SpatialSubdivisio...
Definition: Spatial.h:365
virtual void RevealShore(player_id_t p, bool enable)=0
Reveal the shore for specified player p.
Definition: FixedVector3D.h:24
virtual std::vector< entity_id_t > GetEntitiesByPlayer(player_id_t player) const =0
Returns a list of all entities for a specific player.
std::string GetLosVisibility_wrapper(entity_id_t ent, player_id_t player) const
GetLosVisibility wrapped for script calls.
Definition: ICmpRangeManager.cpp:24
#define DECLARE_INTERFACE_TYPE(iname)
Definition: Interface.h:23
virtual void SetLosCircular(bool enabled)=0
Set the LOS to be restricted to a circular map.
Definition: ICmpRangeManager.h:231
const u32 * m_Data
Definition: ICmpRangeManager.h:320
virtual void SetSharedLos(player_id_t player, const std::vector< player_id_t > &players)=0
Sets shared LOS data for player to the given list of players.
virtual std::vector< entity_id_t > ExecuteQuery(entity_id_t source, entity_pos_t minRange, entity_pos_t maxRange, const std::vector< int > &owners, int requiredInterface)=0
Execute a passive query.
intptr_t ssize_t
Definition: wposix_types.h:82
virtual u8 GetPercentMapExplored(player_id_t player) const =0
Get percent map explored statistics for specified player.
friend class TestLOSTexture
Definition: ICmpRangeManager.h:246
ELosVisibility
Definition: ICmpRangeManager.h:229
bool IsVisible_UncheckedRange(ssize_t i, ssize_t j) const
Returns whether the given vertex is visible (i.e.
Definition: ICmpRangeManager.h:290
Object providing efficient abstracted access to the LOS state.
Definition: ICmpRangeManager.h:242
bool IsVisible(ssize_t i, ssize_t j) const
Returns whether the given vertex is visible (i.e.
Definition: ICmpRangeManager.h:259
virtual std::vector< entity_id_t > GetNonGaiaEntities() const =0
Returns a list of all entities of all players except gaia.
virtual void EnableActiveQuery(tag_t tag)=0
Re-enable the processing of a query.
virtual void RequestVisibilityUpdate(entity_id_t ent)=0
Request the update of the visibility cache of ent at next turn.
Definition: ICmpRangeManager.h:224
virtual void ExploreAllTiles(player_id_t p)=0
Explore all tiles (but leave them in the FoW) for player p.
u32 entity_id_t
Entity ID type.
Definition: Entity.h:23
Definition: ICmpRangeManager.h:226
virtual bool IsActiveQueryEnabled(tag_t tag) const =0
Check if the processing of a query is enabled.
u32 tag_t
External identifiers for active queries.
Definition: ICmpRangeManager.h:75
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.
virtual std::vector< entity_id_t > ExecuteQueryAroundPos(const CFixedVector2D &pos, entity_pos_t minRange, entity_pos_t maxRange, const std::vector< int > &owners, int requiredInterface)=0
Execute a passive query.
virtual bool GetLosCircular() const =0
Returns whether the LOS is restricted to a circular map.