Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
CCmpRangeManager Class Referencefinal

Range manager implementation. More...

Inheritance diagram for CCmpRangeManager:
Collaboration diagram for CCmpRangeManager:

Public Types

using RangeUpdateMessage = std::pair< entity_id_t, CMessageRangeUpdate >
 
using LosRegion = std::pair< std::uint16_t, std::uint16_t >
 
- Public Types inherited from ICmpRangeManager
typedef std::uint32_t tag_t
 External identifiers for active queries. More...
 
- Public Types inherited from IComponent
using AllocFunc = IComponent *(*)(const Script::Interface &scriptInterface, JS::HandleValue ctor)
 
using DeallocFunc = void(*)(IComponent *)
 
using ClassInitFunc = void(*)(CComponentManager &componentManager)
 

Public Member Functions

int GetComponentTypeId () const override
 
void Init (const CParamNode &) override
 
void Deinit () override
 
template<typename S >
void SerializeCommon (S &serialize)
 
void Serialize (ISerializer &serialize) override
 
void Deserialize (const CParamNode &paramNode, IDeserializer &deserialize) override
 
void HandleMessage (const CMessage &msg, bool) override
 
void SetBounds (entity_pos_t x0, entity_pos_t z0, entity_pos_t x1, entity_pos_t z1) override
 Set the bounds of the world. More...
 
void Verify () override
 Perform some internal consistency checks for testing/debugging. More...
 
FastSpatialSubdivision * GetSubdivision () override
 Access the spatial subdivision kept by the range manager. More...
 
void ResetDerivedData ()
 
void ResetSubdivisions (entity_pos_t x1, entity_pos_t z1)
 
tag_t CreateActiveQuery (entity_id_t source, entity_pos_t minRange, entity_pos_t maxRange, const std::vector< int > &owners, int requiredInterface, std::uint8_t flags, bool accountForSize, bool preferMirages) override
 Construct an active query. More...
 
tag_t CreateActiveParabolicQuery (entity_id_t source, entity_pos_t minRange, entity_pos_t maxRange, entity_pos_t baseRange, entity_pos_t yOrigin, const std::vector< int > &owners, int requiredInterface, std::uint8_t flags, bool preferMirages=false) override
 Construct an active query of a parabolic form around the unit. More...
 
void DestroyActiveQuery (tag_t tag) override
 Destroy a query and clean up resources. More...
 
void EnableActiveQuery (tag_t tag) override
 Re-enable the processing of a query. More...
 
void DisableActiveQuery (tag_t tag) override
 Disable the processing of a query (no RangeUpdate messages will be sent). More...
 
bool IsActiveQueryEnabled (tag_t tag) const override
 Check if the processing of a query is enabled. More...
 
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) override
 Execute a passive query. More...
 
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) override
 Execute a passive query. More...
 
std::vector< entity_id_t > ResetActiveQuery (tag_t tag) override
 Immediately execute a query, and re-enable it if disabled. More...
 
std::vector< entity_id_t > GetEntitiesByPlayer (player_id_t player) const override
 Returns a list of all entities for a specific player. More...
 
std::vector< entity_id_t > GetNonGaiaEntities () const override
 Returns a list of all entities of all players except gaia. More...
 
std::vector< entity_id_t > GetGaiaAndNonGaiaEntities () const override
 Returns a list of all entities owned by a player or gaia. More...
 
std::vector< entity_id_t > GetEntitiesByMask (std::uint32_t ownerMask) const
 
void SetDebugOverlay (bool enabled) override
 Toggle the rendering of debug info. More...
 
void ExecuteActiveQueries ()
 Update all currently-enabled active queries. More...
 
bool TestEntityQuery (const Query &q, entity_id_t id, const EntityData &entity) const
 Returns whether the given entity matches the given query (ignoring maxRange) More...
 
void PerformQuery (const Query &q, std::vector< entity_id_t > &r, CFixedVector2D pos, std::vector< uint32_t > &subdivisionResultsBuffer)
 Returns a list of distinct entity IDs that match the given query, sorted by ID. More...
 
entity_pos_t GetEffectiveParabolicRange (entity_id_t source, entity_id_t target, entity_pos_t range, entity_pos_t yOrigin) const override
 Get the effective range in a parablic range query. More...
 
entity_pos_t GetMaxReachableParabolicHeight (entity_pos_t range, entity_pos_t yOrigin, entity_pos_t horizDistance) const override
 Get the max height (relative to the source) a parabolic projectile can reach at a given horizontal distance. More...
 
entity_pos_t GetElevationAdaptedRange (const CFixedVector3D &pos1, const CFixedVector3D &rot, entity_pos_t range, entity_pos_t yOrigin, entity_pos_t angle) const override
 Get the average elevation over 8 points on distance range around the entity. More...
 
std::vector< entity_pos_t > getParabolicRangeForm (CFixedVector3D pos, entity_pos_t maxRange, entity_pos_t cutoff, entity_pos_t minAngle, entity_pos_t maxAngle, int numberOfSteps) const
 
Query ConstructQuery (entity_id_t source, entity_pos_t minRange, entity_pos_t maxRange, const std::vector< int > &owners, int requiredInterface, std::uint8_t flagsMask, bool accountForSize, bool preferMirages=false) const
 
Query ConstructParabolicQuery (entity_id_t source, entity_pos_t minRange, entity_pos_t maxRange, entity_pos_t baseRange, entity_pos_t yOrigin, const std::vector< int > &owners, int requiredInterface, std::uint8_t flagsMask, bool accountForSize, bool preferMirages=false) const
 
void RenderSubmit (SceneCollector &collector)
 
std::uint8_t GetEntityFlagMask (const std::string &identifier) const override
 Returns the mask for the specified identifier. More...
 
void SetEntityFlag (entity_id_t ent, const std::string &identifier, bool value) override
 Set the flag specified by the identifier to the supplied value for the entity. More...
 
CLosQuerier GetLosQuerier (player_id_t player) const override
 Returns a CLosQuerier for checking whether vertex positions are visible to the given player (or other players it shares LOS with). More...
 
void ActivateScriptedVisibility (entity_id_t ent, bool status) override
 Toggle the scripted Visibility component activation for entity ent. More...
 
LosVisibility ComputeLosVisibility (CEntityHandle ent, player_id_t player) const
 
LosVisibility ComputeLosVisibility (entity_id_t ent, player_id_t player) const
 
LosVisibility GetLosVisibility (CEntityHandle ent, player_id_t player) const override
 Returns the visibility status of the given entity, with respect to the given player. More...
 
LosVisibility GetLosVisibility (entity_id_t ent, player_id_t player) const override
 
LosVisibility GetLosVisibilityPosition (entity_pos_t x, entity_pos_t z, player_id_t player) const override
 Returns the visibility status of the given position, with respect to the given player. More...
 
size_t GetVerticesPerSide () const override
 
LosRegion LosVertexToLosRegionsHelper (std::uint16_t x, std::uint16_t z) const
 
LosRegion PosToLosRegionsHelper (entity_pos_t x, entity_pos_t z) const
 
void AddToRegion (LosRegion region, entity_id_t ent)
 
void RemoveFromRegion (LosRegion region, entity_id_t ent)
 
void UpdateVisibilityData ()
 
void RequestVisibilityUpdate (entity_id_t ent) override
 Request the update of the visibility cache of ent at next turn. More...
 
void UpdateVisibility (entity_id_t ent, player_id_t player)
 
void UpdateVisibility (entity_id_t ent)
 
void SetLosRevealWholeMap (player_id_t player, bool enabled) override
 Set whether the whole map should be made visible to the given player. More...
 
void SetLosRevealWholeMapForAll (bool enabled) override
 Set whether the whole map should be made visible to all players. More...
 
bool GetLosRevealWholeMap (player_id_t player) const override
 Returns whether the whole map has been made visible to the given player. More...
 
bool GetLosRevealWholeMapForAll () const override
 Returns whether the whole map has been made visible to all players. More...
 
void SetLosCircular (bool enabled) override
 Set the LOS to be restricted to a circular map. More...
 
bool GetLosCircular () const override
 Returns whether the LOS is restricted to a circular map. More...
 
void SetSharedLos (player_id_t player, const std::vector< player_id_t > &players) override
 Sets shared LOS data for player to the given list of players. More...
 
std::uint32_t GetSharedLosMask (player_id_t player) const override
 Returns shared LOS mask for player. More...
 
void ExploreMap (player_id_t p) override
 Explore the map (but leave it in the FoW) for player p. More...
 
void ExploreTerritories () override
 Explore the tiles inside each player's territory. More...
 
TileCircle WorldToTileCircle (entity_pos_t worldX, entity_pos_t worldZ, fixed radius)
 
void ExploreCircle (player_id_t playerId, entity_pos_t worldX, entity_pos_t worldZ, fixed radius) override
 Explore a circular area of the map for the given player. More...
 
void SeeExploredEntities (player_id_t p) const
 Force any entity in explored territory to appear for player p. More...
 
void RevealShore (player_id_t p, bool enable) override
 Reveal the shore for specified player p. More...
 
bool LosIsOffWorld (ssize_t i, ssize_t j) const
 Returns whether the given vertex is outside the normal bounds of the world (i.e. More...
 
void LosAddStripHelper (std::uint8_t owner, std::int32_t i0, std::int32_t i1, std::int32_t j, Grid< std::uint16_t > &counts)
 Update the LOS state of tiles within a given horizontal strip (i0,j) to (i1,j) (inclusive). More...
 
void LosRemoveStripHelper (std::uint8_t owner, std::int32_t i0, std::int32_t i1, std::int32_t j, Grid< std::uint16_t > &counts)
 Update the LOS state of tiles within a given horizontal strip (i0,j) to (i1,j) (inclusive). More...
 
void MarkVisibilityDirtyAroundTile (std::uint8_t owner, std::int32_t i, std::int32_t j)
 
template<bool adding>
void LosUpdateHelper (std::uint8_t owner, entity_pos_t visionRange, CFixedVector2D pos)
 Update the LOS state of tiles within a given circular range, either adding or removing visibility depending on the template parameter. More...
 
void LosUpdateHelperIncremental (std::uint8_t owner, entity_pos_t visionRange, CFixedVector2D from, CFixedVector2D to)
 Update the LOS state of tiles within a given circular range, by removing visibility around the 'from' position and then adding visibility around the 'to' position. More...
 
void LosAdd (player_id_t owner, entity_pos_t visionRange, CFixedVector2D pos)
 
void SharingLosAdd (std::uint16_t visionSharing, entity_pos_t visionRange, CFixedVector2D pos)
 
void LosRemove (player_id_t owner, entity_pos_t visionRange, CFixedVector2D pos)
 
void SharingLosRemove (std::uint16_t visionSharing, entity_pos_t visionRange, CFixedVector2D pos)
 
void LosMove (player_id_t owner, entity_pos_t visionRange, CFixedVector2D from, CFixedVector2D to)
 
void SharingLosMove (std::uint16_t visionSharing, entity_pos_t visionRange, CFixedVector2D from, CFixedVector2D to)
 
std::uint8_t GetPercentMapExplored (player_id_t player) const override
 Get percent map explored statistics for specified player. More...
 
std::uint8_t GetUnionPercentMapExplored (const std::vector< player_id_t > &players) const override
 Get percent map explored statistics for specified set of players. More...
 
- Public Member Functions inherited from ICmpRangeManager
virtual FastSpatialSubdivision * GetSubdivision ()=0
 Access the spatial subdivision kept by the range manager. More...
 
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. More...
 
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. More...
 
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. More...
 
virtual tag_t CreateActiveQuery (entity_id_t source, entity_pos_t minRange, entity_pos_t maxRange, const std::vector< int > &owners, int requiredInterface, std::uint8_t flags, bool accountForSize, bool preferMirages=false)=0
 Construct an active query. More...
 
virtual tag_t CreateActiveParabolicQuery (entity_id_t source, entity_pos_t minRange, entity_pos_t maxRange, entity_pos_t baseRange, entity_pos_t yOrigin, const std::vector< int > &owners, int requiredInterface, std::uint8_t flags, bool preferMirages=false)=0
 Construct an active query of a parabolic form around the unit. More...
 
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. More...
 
virtual entity_pos_t GetMaxReachableParabolicHeight (entity_pos_t range, entity_pos_t yOrigin, entity_pos_t horizDistance) const =0
 Get the max height (relative to the source) a parabolic projectile can reach at a given horizontal distance. More...
 
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. More...
 
virtual void DestroyActiveQuery (tag_t tag)=0
 Destroy a query and clean up resources. More...
 
virtual void EnableActiveQuery (tag_t tag)=0
 Re-enable the processing of a query. More...
 
virtual void DisableActiveQuery (tag_t tag)=0
 Disable the processing of a query (no RangeUpdate messages will be sent). More...
 
virtual bool IsActiveQueryEnabled (tag_t tag) const =0
 Check if the processing of a query is enabled. More...
 
virtual std::vector< entity_id_t > ResetActiveQuery (tag_t tag)=0
 Immediately execute a query, and re-enable it if disabled. More...
 
virtual std::vector< entity_id_t > GetEntitiesByPlayer (player_id_t player) const =0
 Returns a list of all entities for a specific player. More...
 
virtual std::vector< entity_id_t > GetNonGaiaEntities () const =0
 Returns a list of all entities of all players except gaia. More...
 
virtual std::vector< entity_id_t > GetGaiaAndNonGaiaEntities () const =0
 Returns a list of all entities owned by a player or gaia. More...
 
virtual void SetDebugOverlay (bool enabled)=0
 Toggle the rendering of debug info. More...
 
virtual std::uint8_t GetEntityFlagMask (const std::string &identifier) const =0
 Returns the mask for the specified identifier. More...
 
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. More...
 
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 players it shares LOS with). More...
 
virtual void ActivateScriptedVisibility (entity_id_t ent, bool status)=0
 Toggle the scripted Visibility component activation for entity ent. More...
 
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. More...
 
virtual LosVisibility GetLosVisibility (entity_id_t ent, player_id_t player) const =0
 
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. More...
 
virtual void RequestVisibilityUpdate (entity_id_t ent)=0
 Request the update of the visibility cache of ent at next turn. More...
 
std::string GetLosVisibility_wrapper (entity_id_t ent, player_id_t player) const
 GetLosVisibility wrapped for script calls. More...
 
std::string GetLosVisibilityPosition_wrapper (entity_pos_t x, entity_pos_t z, player_id_t player) const
 GetLosVisibilityPosition wrapped for script calls. More...
 
virtual void ExploreMap (player_id_t p)=0
 Explore the map (but leave it in the FoW) for player p. More...
 
virtual void ExploreTerritories ()=0
 Explore the tiles inside each player's territory. More...
 
virtual void ExploreCircle (player_id_t p, entity_pos_t x, entity_pos_t z, fixed radius)=0
 Explore a circular area of the map for the given player. More...
 
virtual void RevealShore (player_id_t p, bool enable)=0
 Reveal the shore for specified player p. More...
 
virtual void SetLosRevealWholeMap (player_id_t player, bool enabled)=0
 Set whether the whole map should be made visible to the given player. More...
 
virtual void SetLosRevealWholeMapForAll (bool enabled)=0
 Set whether the whole map should be made visible to all players. More...
 
virtual bool GetLosRevealWholeMap (player_id_t player) const =0
 Returns whether the whole map has been made visible to the given player. More...
 
virtual bool GetLosRevealWholeMapForAll () const =0
 Returns whether the whole map has been made visible to all players. More...
 
virtual void SetLosCircular (bool enabled)=0
 Set the LOS to be restricted to a circular map. More...
 
virtual bool GetLosCircular () const =0
 Returns whether the LOS is restricted to a circular map. More...
 
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. More...
 
virtual std::uint32_t GetSharedLosMask (player_id_t player) const =0
 Returns shared LOS mask for player. More...
 
virtual std::uint8_t GetPercentMapExplored (player_id_t player) const =0
 Get percent map explored statistics for specified player. More...
 
virtual std::uint8_t GetUnionPercentMapExplored (const std::vector< player_id_t > &players) const =0
 Get percent map explored statistics for specified set of players. More...
 
virtual size_t GetVerticesPerSide () const =0
 
virtual void Verify ()=0
 Perform some internal consistency checks for testing/debugging. More...
 
- Public Member Functions inherited from IComponent
virtual ~IComponent ()
 
virtual void Init (const CParamNode &paramNode)=0
 
virtual void Deinit ()=0
 
virtual void HandleMessage (const CMessage &msg, bool global)
 
CEntityHandle GetEntityHandle () const
 
void SetEntityHandle (CEntityHandle ent)
 
entity_id_t GetEntityId () const
 
CEntityHandle GetSystemEntity () const
 
const CSimContext & GetSimContext () const
 
void SetSimContext (const CSimContext &context)
 
virtual void Serialize (ISerializer &serialize)=0
 
virtual void Deserialize (const CParamNode &paramNode, IDeserializer &deserialize)=0
 
virtual JS::HandleValue GetJSInstance () const =0
 @Returns JS::NullHandleValue if a scripted wrapper of this IComponent is not supported, the wrapper otherwise. More...
 
virtual int GetComponentTypeId () const =0
 

Static Public Member Functions

static void ClassInit (CComponentManager &componentManager)
 
static IComponent * Allocate (const Script::Interface &, JS::HandleValue)
 
static void Deallocate (IComponent *cmp)
 
static std::string GetSchema ()
 
static entity_pos_t ComputeParabolicRange (entity_pos_t range, entity_pos_t heightDiff)
 Compute effective horizontal range given a reference range and height difference. More...
 
- Static Public Member Functions inherited from IComponent
static std::string GetSchema ()
 
static void RegisterComponentType (CComponentManager &mgr, EInterfaceId iid, EComponentTypeId cid, AllocFunc alloc, DeallocFunc dealloc, const char *name, const std::string &schema)
 
static void RegisterComponentTypeScriptWrapper (CComponentManager &mgr, EInterfaceId iid, EComponentTypeId cid, AllocFunc alloc, DeallocFunc dealloc, const char *name, const std::string &schema, ClassInitFunc classInit)
 
static std::uint8_t GetSerializationVersion ()
 

Public Attributes

bool m_DebugOverlayEnabled
 
bool m_DebugOverlayDirty
 
std::vector< SOverlayLine > m_DebugOverlayLines
 
bool m_Deserializing
 
entity_pos_t m_WorldX0
 
entity_pos_t m_WorldZ0
 
entity_pos_t m_WorldX1
 
entity_pos_t m_WorldZ1
 
tag_t m_QueryNext
 
std::map< tag_t, Query > m_Queries
 
EntityMap< EntityData > m_EntityData
 
FastSpatialSubdivision m_Subdivision
 
std::vector< std::vector< entity_id_t > > m_SubdivisionResultBuffers
 
std::array< bool, MAX_LOS_PLAYER_ID+1 > m_LosRevealWholeMap
 
bool m_LosRevealWholeMapForAll
 
bool m_LosCircular
 
std::int32_t m_LosVerticesPerSide
 
std::int32_t m_LosRegionsPerSide
 
bool m_GlobalVisibilityUpdate
 
std::array< bool, MAX_LOS_PLAYER_ID > m_GlobalPlayerVisibilityUpdate
 
Grid< std::uint16_t > m_DirtyVisibility
 
Grid< std::set< entity_id_t > > m_LosRegions
 
std::vector< entity_id_t > m_ModifiedEntities
 
std::array< Grid< std::uint16_t >, MAX_LOS_PLAYER_ID > m_LosPlayerCounts
 
Grid< std::uint32_t > m_LosState
 
Grid< std::uint32_t > m_LosStateRevealed
 
std::array< std::uint32_t, MAX_LOS_PLAYER_ID+2 > m_SharedLosMasks
 
std::array< std::uint16_t, MAX_LOS_PLAYER_ID+2 > m_SharedDirtyVisibilityMasks
 
std::uint32_t m_TotalInworldVertices
 
std::vector< std::uint32_t > m_ExploredVertices
 

Static Public Attributes

static const player_id_t MAX_LOS_PLAYER_ID = 16
 

Detailed Description

Range manager implementation.

Maintains a list of all entities (and their positions and owners), which is used for queries.

LOS implementation is based on the model described in GPG2. (TODO: would be nice to make it cleverer, so e.g. mountains and walls can block vision)

Member Typedef Documentation

◆ LosRegion

using CCmpRangeManager::LosRegion = std::pair<std::uint16_t, std::uint16_t>

◆ RangeUpdateMessage

Member Function Documentation

◆ ActivateScriptedVisibility()

void CCmpRangeManager::ActivateScriptedVisibility ( entity_id_t  ent,
bool  status 
)
inlineoverridevirtual

Toggle the scripted Visibility component activation for entity ent.

Implements ICmpRangeManager.

◆ AddToRegion()

void CCmpRangeManager::AddToRegion ( LosRegion  region,
entity_id_t  ent 
)
inline

◆ Allocate()

static IComponent * CCmpRangeManager::Allocate ( const Script::Interface &  ,
JS::HandleValue   
)
inlinestatic

◆ ClassInit()

static void CCmpRangeManager::ClassInit ( CComponentManager &  componentManager)
inlinestatic

◆ ComputeLosVisibility() [1/2]

LosVisibility CCmpRangeManager::ComputeLosVisibility ( CEntityHandle  ent,
player_id_t  player 
) const
inline

◆ ComputeLosVisibility() [2/2]

LosVisibility CCmpRangeManager::ComputeLosVisibility ( entity_id_t  ent,
player_id_t  player 
) const
inline

◆ ComputeParabolicRange()

static entity_pos_t CCmpRangeManager::ComputeParabolicRange ( entity_pos_t  range,
entity_pos_t  heightDiff 
)
inlinestatic

Compute effective horizontal range given a reference range and height difference.

◆ ConstructParabolicQuery()

Query CCmpRangeManager::ConstructParabolicQuery ( entity_id_t  source,
entity_pos_t  minRange,
entity_pos_t  maxRange,
entity_pos_t  baseRange,
entity_pos_t  yOrigin,
const std::vector< int > &  owners,
int  requiredInterface,
std::uint8_t  flagsMask,
bool  accountForSize,
bool  preferMirages = false 
) const
inline

◆ ConstructQuery()

Query CCmpRangeManager::ConstructQuery ( entity_id_t  source,
entity_pos_t  minRange,
entity_pos_t  maxRange,
const std::vector< int > &  owners,
int  requiredInterface,
std::uint8_t  flagsMask,
bool  accountForSize,
bool  preferMirages = false 
) const
inline

◆ CreateActiveParabolicQuery()

tag_t CCmpRangeManager::CreateActiveParabolicQuery ( entity_id_t  source,
entity_pos_t  minRange,
entity_pos_t  maxRange,
entity_pos_t  baseRange,
entity_pos_t  yOrigin,
const std::vector< int > &  owners,
int  requiredInterface,
std::uint8_t  flags,
bool  preferMirages = false 
)
inlineoverridevirtual

Construct an active query of a parabolic form around the unit.

The query will be disabled by default.

Parameters
sourcethe entity around which the range will be computed.
minRangenon-negative minimum horizontal distance in metres (inclusive). MinRange doesn't do parabolic checks.
maxRangenon-negative maximum distance in metres (inclusive) for units on the same elevation; or -1.0 to ignore distance. For units on a different height positions, a physical correct paraboloid with height=maxRange/2 above the unit is used to query them
baseRangenon-negative base detection range in metres (inclusive) for simple 2D circle checks. Units within this horizontal distance are always considered in range regardless of height. Set to 0 to disable (original parabolic-only behavior).
yOriginextra bonus so the source can be placed higher and shoot further
ownerslist of player IDs that matching entities may have; -1 matches entities with no owner.
requiredInterfaceif non-zero, an interface ID that matching entities must implement.
flagsif a entity in range has one of the flags set it will show up.
preferMiragesif true, mirage entities are included (bypassing interface checks) and HIDDEN entities are filtered out (needed for targeting fogged enemies). When false (default), mirages are excluded entirely and real entities are returned regardless of visibility (even if hidden). NB: this one has no accountForSize parameter (assumed true), because we currently can only have 7 arguments for JS functions.
Returns
unique non-zero identifier of query.

Implements ICmpRangeManager.

◆ CreateActiveQuery()

tag_t CCmpRangeManager::CreateActiveQuery ( entity_id_t  source,
entity_pos_t  minRange,
entity_pos_t  maxRange,
const std::vector< int > &  owners,
int  requiredInterface,
std::uint8_t  flags,
bool  accountForSize,
bool  preferMirages 
)
inlineoverridevirtual

Construct an active query.

The query will be disabled by default.

Parameters
sourcethe entity around which the range will be computed.
minRangenon-negative minimum distance in metres (inclusive).
maxRangenon-negative maximum distance in metres (inclusive); or -1.0 to ignore distance.
ownerslist of player IDs that matching entities may have; -1 matches entities with no owner.
requiredInterfaceif non-zero, an interface ID that matching entities must implement.
flagsif a entity in range has one of the flags set it will show up.
accountForSizeif true, compensate for source/target entity sizes.
preferMiragesif true, mirage entities are included (bypassing interface checks) and HIDDEN entities are filtered out (needed for targeting fogged enemies). When false (default), mirages are excluded entirely and real entities are returned regardless of visibility (even if hidden).
Returns
unique non-zero identifier of query.

Implements ICmpRangeManager.

◆ Deallocate()

static void CCmpRangeManager::Deallocate ( IComponent *  cmp)
inlinestatic

◆ Deinit()

void CCmpRangeManager::Deinit ( )
inlineoverridevirtual

Implements IComponent.

◆ Deserialize()

void CCmpRangeManager::Deserialize ( const CParamNode &  paramNode,
IDeserializer &  deserialize 
)
inlineoverridevirtual

Implements IComponent.

◆ DestroyActiveQuery()

void CCmpRangeManager::DestroyActiveQuery ( tag_t  tag)
inlineoverridevirtual

Destroy a query and clean up resources.

This must be called when an entity no longer needs its query (e.g. when the entity is destroyed).

Parameters
tagidentifier of query.

Implements ICmpRangeManager.

◆ DisableActiveQuery()

void CCmpRangeManager::DisableActiveQuery ( tag_t  tag)
inlineoverridevirtual

Disable the processing of a query (no RangeUpdate messages will be sent).

Parameters
tagidentifier of query.

Implements ICmpRangeManager.

◆ EnableActiveQuery()

void CCmpRangeManager::EnableActiveQuery ( tag_t  tag)
inlineoverridevirtual

Re-enable the processing of a query.

Parameters
tagidentifier of query.

Implements ICmpRangeManager.

◆ ExecuteActiveQueries()

void CCmpRangeManager::ExecuteActiveQueries ( )
inline

Update all currently-enabled active queries.

◆ ExecuteQuery()

std::vector< entity_id_t > CCmpRangeManager::ExecuteQuery ( entity_id_t  source,
entity_pos_t  minRange,
entity_pos_t  maxRange,
const std::vector< int > &  owners,
int  requiredInterface,
bool  accountForSize 
)
inlineoverridevirtual

Execute a passive query.

Parameters
sourcethe entity around which the range will be computed.
minRangenon-negative minimum distance in metres (inclusive).
maxRangenon-negative maximum distance in metres (inclusive); or -1.0 to ignore distance.
ownerslist of player IDs that matching entities may have; -1 matches entities with no owner.
requiredInterfaceif non-zero, an interface ID that matching entities must implement.
accountForSizeif true, compensate for source/target entity sizes.
Returns
list of entities matching the query, ordered by increasing distance from the source entity.

Implements ICmpRangeManager.

◆ ExecuteQueryAroundPos()

std::vector< entity_id_t > CCmpRangeManager::ExecuteQueryAroundPos ( const CFixedVector2D &  pos,
entity_pos_t  minRange,
entity_pos_t  maxRange,
const std::vector< int > &  owners,
int  requiredInterface,
bool  accountForSize 
)
inlineoverridevirtual

Execute a passive query.

Parameters
posthe position around which the range will be computed.
minRangenon-negative minimum distance in metres (inclusive).
maxRangenon-negative maximum distance in metres (inclusive); or -1.0 to ignore distance.
ownerslist of player IDs that matching entities may have; -1 matches entities with no owner.
requiredInterfaceif non-zero, an interface ID that matching entities must implement.
accountForSizeif true, compensate for source/target entity sizes.
Returns
list of entities matching the query, ordered by increasing distance from the source entity.

Implements ICmpRangeManager.

◆ ExploreCircle()

void CCmpRangeManager::ExploreCircle ( player_id_t  p,
entity_pos_t  x,
entity_pos_t  z,
fixed  radius 
)
inlineoverridevirtual

Explore a circular area of the map for the given player.

This marks the tiles as explored (fogged) but not necessarily visible.

Implements ICmpRangeManager.

◆ ExploreMap()

void CCmpRangeManager::ExploreMap ( player_id_t  p)
inlineoverridevirtual

Explore the map (but leave it in the FoW) for player p.

Implements ICmpRangeManager.

◆ ExploreTerritories()

void CCmpRangeManager::ExploreTerritories ( )
inlineoverridevirtual

Explore the tiles inside each player's territory.

This is done only at the beginning of the game.

Implements ICmpRangeManager.

◆ GetComponentTypeId()

int CCmpRangeManager::GetComponentTypeId ( ) const
inlineoverridevirtual

Implements IComponent.

◆ GetEffectiveParabolicRange()

entity_pos_t CCmpRangeManager::GetEffectiveParabolicRange ( entity_id_t  source,
entity_id_t  target,
entity_pos_t  range,
entity_pos_t  yOrigin 
) const
inlineoverridevirtual

Get the effective range in a parablic range query.

Parameters
sourceThe entity id at the origin of the query.
targetA target entity id.
rangeThe distance to compare terrain height with.
yOriginHeight the source gains over the target by default.
Returns
a fixed number representing the effective range correcting parabolicly for the height difference. Returns -1 when the target is too high compared to the source to be in range.

Implements ICmpRangeManager.

◆ GetElevationAdaptedRange()

entity_pos_t CCmpRangeManager::GetElevationAdaptedRange ( const CFixedVector3D &  pos,
const CFixedVector3D &  rot,
entity_pos_t  range,
entity_pos_t  yOrigin,
entity_pos_t  angle 
) const
inlineoverridevirtual

Get the average elevation over 8 points on distance range around the entity.

Parameters
idthe entity id to look around
rangethe distance to compare terrain height with
Returns
a fixed number representing the average difference. It's positive when the entity is on average higher than the terrain surrounding it.

Implements ICmpRangeManager.

◆ GetEntitiesByMask()

std::vector< entity_id_t > CCmpRangeManager::GetEntitiesByMask ( std::uint32_t  ownerMask) const
inline

◆ GetEntitiesByPlayer()

std::vector< entity_id_t > CCmpRangeManager::GetEntitiesByPlayer ( player_id_t  player) const
inlineoverridevirtual

Returns a list of all entities for a specific player.

(This is on this interface because it shares a lot of the implementation. Maybe it should be extended to be more like ExecuteQuery without the range parameter.)

Implements ICmpRangeManager.

◆ GetEntityFlagMask()

std::uint8_t CCmpRangeManager::GetEntityFlagMask ( const std::string &  identifier) const
inlineoverridevirtual

Returns the mask for the specified identifier.

Implements ICmpRangeManager.

◆ GetGaiaAndNonGaiaEntities()

std::vector< entity_id_t > CCmpRangeManager::GetGaiaAndNonGaiaEntities ( ) const
inlineoverridevirtual

Returns a list of all entities owned by a player or gaia.

Implements ICmpRangeManager.

◆ GetLosCircular()

bool CCmpRangeManager::GetLosCircular ( ) const
inlineoverridevirtual

Returns whether the LOS is restricted to a circular map.

Implements ICmpRangeManager.

◆ GetLosQuerier()

CLosQuerier CCmpRangeManager::GetLosQuerier ( player_id_t  player) const
inlineoverridevirtual

Returns a CLosQuerier for checking whether vertex positions are visible to the given player (or other players it shares LOS with).

Implements ICmpRangeManager.

◆ GetLosRevealWholeMap()

bool CCmpRangeManager::GetLosRevealWholeMap ( player_id_t  player) const
inlineoverridevirtual

Returns whether the whole map has been made visible to the given player.

Implements ICmpRangeManager.

◆ GetLosRevealWholeMapForAll()

bool CCmpRangeManager::GetLosRevealWholeMapForAll ( ) const
inlineoverridevirtual

Returns whether the whole map has been made visible to all players.

Implements ICmpRangeManager.

◆ GetLosVisibility() [1/2]

LosVisibility CCmpRangeManager::GetLosVisibility ( CEntityHandle  ent,
player_id_t  player 
) const
inlineoverridevirtual

Returns the visibility status of the given entity, with respect to the given player.

Returns LosVisibility::HIDDEN if the entity doesn't exist or is not in the world. This respects the GetLosRevealWholeMap flag.

Implements ICmpRangeManager.

◆ GetLosVisibility() [2/2]

LosVisibility CCmpRangeManager::GetLosVisibility ( entity_id_t  ent,
player_id_t  player 
) const
inlineoverridevirtual

Implements ICmpRangeManager.

◆ GetLosVisibilityPosition()

LosVisibility CCmpRangeManager::GetLosVisibilityPosition ( entity_pos_t  x,
entity_pos_t  z,
player_id_t  player 
) const
inlineoverridevirtual

Returns the visibility status of the given position, with respect to the given player.

This respects the GetLosRevealWholeMap flag.

Implements ICmpRangeManager.

◆ GetMaxReachableParabolicHeight()

entity_pos_t CCmpRangeManager::GetMaxReachableParabolicHeight ( entity_pos_t  range,
entity_pos_t  yOrigin,
entity_pos_t  horizDistance 
) const
inlineoverridevirtual

Get the max height (relative to the source) a parabolic projectile can reach at a given horizontal distance.

Parameters
sourcethe entity at the origin.
rangethe maximum parabolic range on flat terrain.
yOriginheight bonus for the source.
horizDistancethe horizontal distance to check.
Returns
the maximum reachable height difference (target height - source height), or a very negative value if the horizontal distance exceeds the range.

Implements ICmpRangeManager.

◆ GetNonGaiaEntities()

std::vector< entity_id_t > CCmpRangeManager::GetNonGaiaEntities ( ) const
inlineoverridevirtual

Returns a list of all entities of all players except gaia.

Implements ICmpRangeManager.

◆ getParabolicRangeForm()

std::vector< entity_pos_t > CCmpRangeManager::getParabolicRangeForm ( CFixedVector3D  pos,
entity_pos_t  maxRange,
entity_pos_t  cutoff,
entity_pos_t  minAngle,
entity_pos_t  maxAngle,
int  numberOfSteps 
) const
inline

◆ GetPercentMapExplored()

std::uint8_t CCmpRangeManager::GetPercentMapExplored ( player_id_t  player) const
inlineoverridevirtual

Get percent map explored statistics for specified player.

Implements ICmpRangeManager.

◆ GetSchema()

static std::string CCmpRangeManager::GetSchema ( )
inlinestatic

◆ GetSharedLosMask()

std::uint32_t CCmpRangeManager::GetSharedLosMask ( player_id_t  player) const
inlineoverridevirtual

Returns shared LOS mask for player.

Implements ICmpRangeManager.

◆ GetSubdivision()

FastSpatialSubdivision * CCmpRangeManager::GetSubdivision ( )
inlineoverridevirtual

Access the spatial subdivision kept by the range manager.

Returns
pointer to spatial subdivision structure.

Implements ICmpRangeManager.

◆ GetUnionPercentMapExplored()

std::uint8_t CCmpRangeManager::GetUnionPercentMapExplored ( const std::vector< player_id_t > &  players) const
inlineoverridevirtual

Get percent map explored statistics for specified set of players.

Note: this function computes statistics from scratch and should not be called too often.

Implements ICmpRangeManager.

◆ GetVerticesPerSide()

size_t CCmpRangeManager::GetVerticesPerSide ( ) const
inlineoverridevirtual
Returns
The number of LOS vertices.

Implements ICmpRangeManager.

◆ HandleMessage()

void CCmpRangeManager::HandleMessage ( const CMessage &  msg,
bool   
)
inlineoverridevirtual

Reimplemented from IComponent.

◆ Init()

void CCmpRangeManager::Init ( const CParamNode &  )
inlineoverridevirtual

Implements IComponent.

◆ IsActiveQueryEnabled()

bool CCmpRangeManager::IsActiveQueryEnabled ( tag_t  tag) const
inlineoverridevirtual

Check if the processing of a query is enabled.

Parameters
tagidentifier of a query.

Implements ICmpRangeManager.

◆ LosAdd()

void CCmpRangeManager::LosAdd ( player_id_t  owner,
entity_pos_t  visionRange,
CFixedVector2D  pos 
)
inline

◆ LosAddStripHelper()

void CCmpRangeManager::LosAddStripHelper ( std::uint8_t  owner,
std::int32_t  i0,
std::int32_t  i1,
std::int32_t  j,
Grid< std::uint16_t > &  counts 
)
inline

Update the LOS state of tiles within a given horizontal strip (i0,j) to (i1,j) (inclusive).

◆ LosIsOffWorld()

bool CCmpRangeManager::LosIsOffWorld ( ssize_t  i,
ssize_t  j 
) const
inline

Returns whether the given vertex is outside the normal bounds of the world (i.e.

outside the range of a circular map)

◆ LosMove()

void CCmpRangeManager::LosMove ( player_id_t  owner,
entity_pos_t  visionRange,
CFixedVector2D  from,
CFixedVector2D  to 
)
inline

◆ LosRemove()

void CCmpRangeManager::LosRemove ( player_id_t  owner,
entity_pos_t  visionRange,
CFixedVector2D  pos 
)
inline

◆ LosRemoveStripHelper()

void CCmpRangeManager::LosRemoveStripHelper ( std::uint8_t  owner,
std::int32_t  i0,
std::int32_t  i1,
std::int32_t  j,
Grid< std::uint16_t > &  counts 
)
inline

Update the LOS state of tiles within a given horizontal strip (i0,j) to (i1,j) (inclusive).

◆ LosUpdateHelper()

template<bool adding>
void CCmpRangeManager::LosUpdateHelper ( std::uint8_t  owner,
entity_pos_t  visionRange,
CFixedVector2D  pos 
)
inline

Update the LOS state of tiles within a given circular range, either adding or removing visibility depending on the template parameter.

Assumes owner is in the valid range.

◆ LosUpdateHelperIncremental()

void CCmpRangeManager::LosUpdateHelperIncremental ( std::uint8_t  owner,
entity_pos_t  visionRange,
CFixedVector2D  from,
CFixedVector2D  to 
)
inline

Update the LOS state of tiles within a given circular range, by removing visibility around the 'from' position and then adding visibility around the 'to' position.

◆ LosVertexToLosRegionsHelper()

LosRegion CCmpRangeManager::LosVertexToLosRegionsHelper ( std::uint16_t  x,
std::uint16_t  z 
) const
inline

◆ MarkVisibilityDirtyAroundTile()

void CCmpRangeManager::MarkVisibilityDirtyAroundTile ( std::uint8_t  owner,
std::int32_t  i,
std::int32_t  j 
)
inline

◆ PerformQuery()

void CCmpRangeManager::PerformQuery ( const Query &  q,
std::vector< entity_id_t > &  r,
CFixedVector2D  pos,
std::vector< uint32_t > &  subdivisionResultsBuffer 
)
inline

Returns a list of distinct entity IDs that match the given query, sorted by ID.

◆ PosToLosRegionsHelper()

LosRegion CCmpRangeManager::PosToLosRegionsHelper ( entity_pos_t  x,
entity_pos_t  z 
) const
inline

◆ RemoveFromRegion()

void CCmpRangeManager::RemoveFromRegion ( LosRegion  region,
entity_id_t  ent 
)
inline

◆ RenderSubmit()

void CCmpRangeManager::RenderSubmit ( SceneCollector &  collector)
inline

◆ RequestVisibilityUpdate()

void CCmpRangeManager::RequestVisibilityUpdate ( entity_id_t  ent)
inlineoverridevirtual

Request the update of the visibility cache of ent at next turn.

Typically used for fogging.

Implements ICmpRangeManager.

◆ ResetActiveQuery()

std::vector< entity_id_t > CCmpRangeManager::ResetActiveQuery ( tag_t  tag)
inlineoverridevirtual

Immediately execute a query, and re-enable it if disabled.

The next RangeUpdate message will say who has entered/left since this call, so you won't miss any notifications.

Parameters
tagidentifier of query.
Returns
list of entities matching the query, ordered by increasing distance from the source entity.

Implements ICmpRangeManager.

◆ ResetDerivedData()

void CCmpRangeManager::ResetDerivedData ( )
inline

◆ ResetSubdivisions()

void CCmpRangeManager::ResetSubdivisions ( entity_pos_t  x1,
entity_pos_t  z1 
)
inline

◆ RevealShore()

void CCmpRangeManager::RevealShore ( player_id_t  p,
bool  enable 
)
inlineoverridevirtual

Reveal the shore for specified player p.

This works like for entities: if RevealShore is called multiple times with enabled, it will be necessary to call it the same number of times with !enabled to make the shore fall back into the FoW.

Implements ICmpRangeManager.

◆ SeeExploredEntities()

void CCmpRangeManager::SeeExploredEntities ( player_id_t  p) const
inline

Force any entity in explored territory to appear for player p.

This is useful for miraging entities inside the territory borders at the beginning of a game, or if the "Explore Map" option has been set.

◆ Serialize()

void CCmpRangeManager::Serialize ( ISerializer &  serialize)
inlineoverridevirtual

Implements IComponent.

◆ SerializeCommon()

template<typename S >
void CCmpRangeManager::SerializeCommon ( S &  serialize)
inline

◆ SetBounds()

void CCmpRangeManager::SetBounds ( entity_pos_t  x0,
entity_pos_t  z0,
entity_pos_t  x1,
entity_pos_t  z1 
)
inlineoverridevirtual

Set the bounds of the world.

Entities should not be outside the bounds (else efficiency will suffer).

Parameters
x0,z0,x1,z1Coordinates of the corners of the world

Implements ICmpRangeManager.

◆ SetDebugOverlay()

void CCmpRangeManager::SetDebugOverlay ( bool  enabled)
inlineoverridevirtual

Toggle the rendering of debug info.

Implements ICmpRangeManager.

◆ SetEntityFlag()

void CCmpRangeManager::SetEntityFlag ( entity_id_t  ent,
const std::string &  identifier,
bool  value 
)
inlineoverridevirtual

Set the flag specified by the identifier to the supplied value for the entity.

Parameters
entthe entity whose flags will be modified.
identifierthe flag to be modified.
valueto which the flag will be set.

Implements ICmpRangeManager.

◆ SetLosCircular()

void CCmpRangeManager::SetLosCircular ( bool  enabled)
inlineoverridevirtual

Set the LOS to be restricted to a circular map.

Implements ICmpRangeManager.

◆ SetLosRevealWholeMap()

void CCmpRangeManager::SetLosRevealWholeMap ( player_id_t  player,
bool  enabled 
)
inlineoverridevirtual

Set whether the whole map should be made visible to the given player.

Implements ICmpRangeManager.

◆ SetLosRevealWholeMapForAll()

void CCmpRangeManager::SetLosRevealWholeMapForAll ( bool  enabled)
inlineoverridevirtual

Set whether the whole map should be made visible to all players.

Implements ICmpRangeManager.

◆ SetSharedLos()

void CCmpRangeManager::SetSharedLos ( player_id_t  player,
const std::vector< player_id_t > &  players 
)
inlineoverridevirtual

Sets shared LOS data for player to the given list of players.

Implements ICmpRangeManager.

◆ SharingLosAdd()

void CCmpRangeManager::SharingLosAdd ( std::uint16_t  visionSharing,
entity_pos_t  visionRange,
CFixedVector2D  pos 
)
inline

◆ SharingLosMove()

void CCmpRangeManager::SharingLosMove ( std::uint16_t  visionSharing,
entity_pos_t  visionRange,
CFixedVector2D  from,
CFixedVector2D  to 
)
inline

◆ SharingLosRemove()

void CCmpRangeManager::SharingLosRemove ( std::uint16_t  visionSharing,
entity_pos_t  visionRange,
CFixedVector2D  pos 
)
inline

◆ TestEntityQuery()

bool CCmpRangeManager::TestEntityQuery ( const Query &  q,
entity_id_t  id,
const EntityData &  entity 
) const
inline

Returns whether the given entity matches the given query (ignoring maxRange)

◆ UpdateVisibility() [1/2]

void CCmpRangeManager::UpdateVisibility ( entity_id_t  ent)
inline

◆ UpdateVisibility() [2/2]

void CCmpRangeManager::UpdateVisibility ( entity_id_t  ent,
player_id_t  player 
)
inline

◆ UpdateVisibilityData()

void CCmpRangeManager::UpdateVisibilityData ( )
inline

◆ Verify()

void CCmpRangeManager::Verify ( )
inlineoverridevirtual

Perform some internal consistency checks for testing/debugging.

Implements ICmpRangeManager.

◆ WorldToTileCircle()

TileCircle CCmpRangeManager::WorldToTileCircle ( entity_pos_t  worldX,
entity_pos_t  worldZ,
fixed  radius 
)
inline

Member Data Documentation

◆ m_DebugOverlayDirty

bool CCmpRangeManager::m_DebugOverlayDirty

◆ m_DebugOverlayEnabled

bool CCmpRangeManager::m_DebugOverlayEnabled

◆ m_DebugOverlayLines

std::vector<SOverlayLine> CCmpRangeManager::m_DebugOverlayLines

◆ m_Deserializing

bool CCmpRangeManager::m_Deserializing

◆ m_DirtyVisibility

Grid<std::uint16_t> CCmpRangeManager::m_DirtyVisibility

◆ m_EntityData

EntityMap<EntityData> CCmpRangeManager::m_EntityData

◆ m_ExploredVertices

std::vector<std::uint32_t> CCmpRangeManager::m_ExploredVertices

◆ m_GlobalPlayerVisibilityUpdate

std::array<bool, MAX_LOS_PLAYER_ID> CCmpRangeManager::m_GlobalPlayerVisibilityUpdate

◆ m_GlobalVisibilityUpdate

bool CCmpRangeManager::m_GlobalVisibilityUpdate

◆ m_LosCircular

bool CCmpRangeManager::m_LosCircular

◆ m_LosPlayerCounts

std::array<Grid<std::uint16_t>, MAX_LOS_PLAYER_ID> CCmpRangeManager::m_LosPlayerCounts

◆ m_LosRegions

Grid<std::set<entity_id_t> > CCmpRangeManager::m_LosRegions

◆ m_LosRegionsPerSide

std::int32_t CCmpRangeManager::m_LosRegionsPerSide

◆ m_LosRevealWholeMap

std::array<bool, MAX_LOS_PLAYER_ID+1> CCmpRangeManager::m_LosRevealWholeMap

◆ m_LosRevealWholeMapForAll

bool CCmpRangeManager::m_LosRevealWholeMapForAll

◆ m_LosState

Grid<std::uint32_t> CCmpRangeManager::m_LosState

◆ m_LosStateRevealed

Grid<std::uint32_t> CCmpRangeManager::m_LosStateRevealed

◆ m_LosVerticesPerSide

std::int32_t CCmpRangeManager::m_LosVerticesPerSide

◆ m_ModifiedEntities

std::vector<entity_id_t> CCmpRangeManager::m_ModifiedEntities

◆ m_Queries

std::map<tag_t, Query> CCmpRangeManager::m_Queries

◆ m_QueryNext

tag_t CCmpRangeManager::m_QueryNext

◆ m_SharedDirtyVisibilityMasks

std::array<std::uint16_t, MAX_LOS_PLAYER_ID+2> CCmpRangeManager::m_SharedDirtyVisibilityMasks

◆ m_SharedLosMasks

std::array<std::uint32_t, MAX_LOS_PLAYER_ID+2> CCmpRangeManager::m_SharedLosMasks

◆ m_Subdivision

FastSpatialSubdivision CCmpRangeManager::m_Subdivision

◆ m_SubdivisionResultBuffers

std::vector<std::vector<entity_id_t> > CCmpRangeManager::m_SubdivisionResultBuffers

◆ m_TotalInworldVertices

std::uint32_t CCmpRangeManager::m_TotalInworldVertices

◆ m_WorldX0

entity_pos_t CCmpRangeManager::m_WorldX0

◆ m_WorldX1

entity_pos_t CCmpRangeManager::m_WorldX1

◆ m_WorldZ0

entity_pos_t CCmpRangeManager::m_WorldZ0

◆ m_WorldZ1

entity_pos_t CCmpRangeManager::m_WorldZ1

◆ MAX_LOS_PLAYER_ID

const player_id_t CCmpRangeManager::MAX_LOS_PLAYER_ID = 16
static

The documentation for this class was generated from the following file: