18#ifndef INCLUDED_ICMPRANGEMANAGER
19#define INCLUDED_ICMPRANGEMANAGER
135 const std::vector<int>& owners,
int requiredInterface,
bool accountForSize) = 0;
148 const std::vector<int>& owners,
int requiredInterface,
bool accountForSize) = 0;
162 const std::vector<int>& owners,
int requiredInterface,
u8 flags,
bool accountForSize) = 0;
180 const std::vector<int>& owners,
int requiredInterface,
u8 flags) = 0;
LosVisibility
Since GetVisibility queries are run by the range manager other code using these must include ICmpRang...
Definition: ICmpRangeManager.h:51
const entity_pos_t NEVER_IN_RANGE
Value assigned to a range we will never be in (caused by out of world or "too high" in parabolic rang...
Definition: ICmpRangeManager.h:42
const entity_pos_t ALWAYS_IN_RANGE
Value assigned to a range we will always be in (caused by out of world or "too high" in parabolic ran...
Definition: ICmpRangeManager.h:36
#define DECLARE_INTERFACE_TYPE(iname)
Definition: Interface.h:23
int32_t player_id_t
valid player IDs are non-negative (see ICmpOwnership)
Definition: Player.h:24
Object wrapping an entity_id_t, with a SEntityComponentCache to support fast QueryInterface() / CmpPt...
Definition: Entity.h:80
Definition: FixedVector2D.h:25
Definition: FixedVector3D.h:25
A simple fixed-point number class.
Definition: Fixed.h:120
static constexpr CFixed FromInt(int n)
Definition: Fixed.h:140
Object providing efficient abstracted access to the LOS state.
Definition: Los.h:47
A basic square subdivision scheme for finding entities in range More efficient than SpatialSubdivisio...
Definition: Spatial.h:367
Provides efficient range-based queries of the game world, and also LOS-based effects (fog of war).
Definition: ICmpRangeManager.h:104
virtual std::vector< entity_id_t > GetGaiaAndNonGaiaEntities() const =0
Returns a list of all entities owned by a player or gaia.
std::string GetLosVisibilityPosition_wrapper(entity_pos_t x, entity_pos_t z, player_id_t player) const
GetLosVisibilityPosition wrapped for script calls.
Definition: ICmpRangeManager.cpp:42
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 GetEffectiveParabolicRange(entity_id_t source, entity_id_t target, entity_pos_t range, entity_pos_t yOrigin) const =0
Get the effective range in a parablic range query.
virtual u8 GetEntityFlagMask(const std::string &identifier) const =0
Returns the mask for the specified identifier.
virtual void EnableActiveQuery(tag_t tag)=0
Re-enable the processing of a query.
virtual void ActivateScriptedVisibility(entity_id_t ent, bool status)=0
Toggle the scripted Visibility component activation for entity ent.
virtual u8 GetUnionPercentMapExplored(const std::vector< player_id_t > &players) const =0
Get percent map explored statistics for specified set of players.
virtual entity_pos_t GetElevationAdaptedRange(const CFixedVector3D &pos, const CFixedVector3D &rot, entity_pos_t range, entity_pos_t yOrigin, entity_pos_t angle) const =0
Get the average elevation over 8 points on distance range around the entity.
virtual bool GetLosRevealAll(player_id_t player) const =0
Returns whether the whole map has been made visible to the given player.
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 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 > GetEntitiesByPlayer(player_id_t player) const =0
Returns a list of all entities for a specific player.
virtual void Verify()=0
Perform some internal consistency checks for testing/debugging.
virtual bool IsActiveQueryEnabled(tag_t tag) const =0
Check if the processing of a query is enabled.
virtual tag_t CreateActiveParabolicQuery(entity_id_t source, entity_pos_t minRange, entity_pos_t maxRange, entity_pos_t yOrigin, const std::vector< int > &owners, int requiredInterface, u8 flags)=0
Construct an active query of a paraboloic form around the unit.
virtual void DisableActiveQuery(tag_t tag)=0
Disable the processing of a query (no RangeUpdate messages will be sent).
virtual LosVisibility GetLosVisibilityPosition(entity_pos_t x, entity_pos_t z, player_id_t player) const =0
Returns the visibility status of the given position, with respect to the given player.
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, bool accountForSize)=0
Construct an active query.
virtual std::vector< entity_id_t > ResetActiveQuery(tag_t tag)=0
Immediately execute a query, and re-enable it if disabled.
virtual std::vector< entity_id_t > GetNonGaiaEntities() const =0
Returns a list of all entities of all players except gaia.
virtual u8 GetPercentMapExplored(player_id_t player) const =0
Get percent map explored statistics for specified player.
virtual bool GetLosCircular() const =0
Returns whether the LOS is restricted to a circular map.
virtual void SetBounds(entity_pos_t x0, entity_pos_t z0, entity_pos_t x1, entity_pos_t z1)=0
Set the bounds of the world.
virtual void RequestVisibilityUpdate(entity_id_t ent)=0
Request the update of the visibility cache of ent at next turn.
virtual void RevealShore(player_id_t p, bool enable)=0
Reveal the shore for specified player p.
u32 tag_t
External identifiers for active queries.
Definition: ICmpRangeManager.h:109
virtual LosVisibility GetLosVisibility(CEntityHandle ent, player_id_t player) const =0
Returns the visibility status of the given entity, with respect to the given player.
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, bool accountForSize)=0
Execute a passive query.
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, bool accountForSize)=0
Execute a passive query.
virtual void SetLosCircular(bool enabled)=0
Set the LOS to be restricted to a circular map.
virtual void ExploreMap(player_id_t p)=0
Explore the map (but leave it in the FoW) for player p.
virtual size_t GetVerticesPerSide() const =0
std::string GetLosVisibility_wrapper(entity_id_t ent, player_id_t player) const
GetLosVisibility wrapped for script calls.
Definition: ICmpRangeManager.cpp:37
virtual u32 GetSharedLosMask(player_id_t player) const =0
Returns shared LOS mask for player.
virtual LosVisibility GetLosVisibility(entity_id_t ent, player_id_t player) const =0
virtual void ExploreTerritories()=0
Explore the tiles inside each player's territory.
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.
virtual FastSpatialSubdivision * GetSubdivision()=0
Access the spatial subdivision kept by the range manager.
virtual void SetDebugOverlay(bool enabled)=0
Toggle the rendering of debug info.
virtual void DestroyActiveQuery(tag_t tag)=0
Destroy a query and clean up resources.
Definition: IComponent.h:33
u32 entity_id_t
Entity ID type.
Definition: Entity.h:29
uint8_t u8
Definition: types.h:37
uint32_t u32
Definition: types.h:39