Pyrogenesis
13997
|
Classes | |
struct | SBoundaryLine |
Public Member Functions | |
virtual void | Init (const CParamNode ¶mNode) |
virtual void | Deinit () |
virtual void | Serialize (ISerializer &serialize) |
virtual void | Deserialize (const CParamNode ¶mNode, IDeserializer &deserialize) |
virtual void | HandleMessage (const CMessage &msg, bool global) |
void | MakeDirtyIfRelevantEntity (entity_id_t ent) |
virtual const Grid< u8 > & | GetTerritoryGrid () |
For each tile, the TERRITORY_PLAYER_MASK bits are player ID; TERRITORY_CONNECTED_MASK is set if the tile is connected to a root object (civ center etc). More... | |
virtual player_id_t | GetOwner (entity_pos_t x, entity_pos_t z) |
Get owner of territory at given position. More... | |
virtual bool | IsConnected (entity_pos_t x, entity_pos_t z) |
Get whether territory at given position is connected to a root object (civ center etc) owned by that territory's player. More... | |
void | MakeDirty () |
virtual bool | NeedUpdate (size_t *dirtyID) |
void | CalculateTerritories () |
void | RasteriseInfluences (CComponentManager::InterfaceList &infls, Grid< u8 > &grid) |
Updates grid based on the obstruction shapes of all entities with a TerritoryInfluence component. More... | |
std::vector< STerritoryBoundary > | ComputeBoundaries () |
void | UpdateBoundaryLines () |
void | Interpolate (float frameTime, float frameOffset) |
void | RenderSubmit (SceneCollector &collector) |
![]() | |
virtual | ~IComponent () |
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 JSClass * | GetJSClass () const |
virtual jsval | GetJSInstance () const |
Static Public Member Functions | |
static void | ClassInit (CComponentManager &componentManager) |
static IComponent * | Allocate (ScriptInterface &, jsval) |
static void | Deallocate (IComponent *cmp) |
static std::string | GetSchema () |
![]() | |
static std::string | GetSchema () |
static u8 | GetSerializationVersion () |
Public Attributes | |
u8 | m_ImpassableCost |
float | m_BorderThickness |
float | m_BorderSeparation |
Grid< u8 > * | m_Territories |
bool | m_TriggerEvent |
std::vector< SBoundaryLine > | m_BoundaryLines |
bool | m_BoundaryLinesDirty |
double | m_AnimTime |
TerritoryOverlay * | m_DebugOverlay |
bool | m_EnableLineDebugOverlays |
Enable node debugging overlays for boundary lines? More... | |
std::vector< SOverlayLine > | m_DebugBoundaryLineNodes |
size_t | m_DirtyID |
Additional Inherited Members | |
![]() | |
static const int | TERRITORY_PLAYER_MASK = 0x3F |
static const int | TERRITORY_CONNECTED_MASK = 0x40 |
static const int | TERRITORY_PROCESSED_MASK = 0x80 |
Definition at line 62 of file CCmpTerritoryManager.cpp.
|
inlinestatic |
Definition at line 76 of file CCmpTerritoryManager.cpp.
void CCmpTerritoryManager::CalculateTerritories | ( | ) |
Definition at line 332 of file CCmpTerritoryManager.cpp.
|
inlinestatic |
Definition at line 65 of file CCmpTerritoryManager.cpp.
std::vector< STerritoryBoundary > CCmpTerritoryManager::ComputeBoundaries | ( | ) |
Definition at line 599 of file CCmpTerritoryManager.cpp.
|
inlinestatic |
Definition at line 76 of file CCmpTerritoryManager.cpp.
|
inlinevirtual |
Implements IComponent.
Definition at line 135 of file CCmpTerritoryManager.cpp.
|
inlinevirtual |
Implements IComponent.
Definition at line 147 of file CCmpTerritoryManager.cpp.
|
virtual |
Get owner of territory at given position.
Implements ICmpTerritoryManager.
Definition at line 715 of file CCmpTerritoryManager.cpp.
|
inlinestatic |
Definition at line 78 of file CCmpTerritoryManager.cpp.
For each tile, the TERRITORY_PLAYER_MASK bits are player ID; TERRITORY_CONNECTED_MASK is set if the tile is connected to a root object (civ center etc).
Implements ICmpTerritoryManager.
Definition at line 218 of file CCmpTerritoryManager.cpp.
|
inlinevirtual |
Reimplemented from IComponent.
Definition at line 152 of file CCmpTerritoryManager.cpp.
|
inlinevirtual |
Implements IComponent.
Definition at line 113 of file CCmpTerritoryManager.cpp.
void CCmpTerritoryManager::Interpolate | ( | float | frameTime, |
float | frameOffset | ||
) |
Definition at line 684 of file CCmpTerritoryManager.cpp.
|
virtual |
Get whether territory at given position is connected to a root object (civ center etc) owned by that territory's player.
Implements ICmpTerritoryManager.
Definition at line 726 of file CCmpTerritoryManager.cpp.
|
inline |
Definition at line 234 of file CCmpTerritoryManager.cpp.
|
inline |
Definition at line 207 of file CCmpTerritoryManager.cpp.
|
inlinevirtual |
Implements ICmpTerritoryManager.
Definition at line 242 of file CCmpTerritoryManager.cpp.
void CCmpTerritoryManager::RasteriseInfluences | ( | CComponentManager::InterfaceList & | infls, |
Grid< u8 > & | grid | ||
) |
Updates grid
based on the obstruction shapes of all entities with a TerritoryInfluence component.
Grid cells are 0 if no influence, or 1+c if the influence have cost c (assumed between 0 and 254).
Definition at line 561 of file CCmpTerritoryManager.cpp.
void CCmpTerritoryManager::RenderSubmit | ( | SceneCollector & | collector | ) |
Definition at line 705 of file CCmpTerritoryManager.cpp.
|
inlinevirtual |
Implements IComponent.
Definition at line 141 of file CCmpTerritoryManager.cpp.
void CCmpTerritoryManager::UpdateBoundaryLines | ( | ) |
Definition at line 609 of file CCmpTerritoryManager.cpp.
double CCmpTerritoryManager::m_AnimTime |
Definition at line 106 of file CCmpTerritoryManager.cpp.
float CCmpTerritoryManager::m_BorderSeparation |
Definition at line 85 of file CCmpTerritoryManager.cpp.
float CCmpTerritoryManager::m_BorderThickness |
Definition at line 84 of file CCmpTerritoryManager.cpp.
std::vector<SBoundaryLine> CCmpTerritoryManager::m_BoundaryLines |
Definition at line 103 of file CCmpTerritoryManager.cpp.
bool CCmpTerritoryManager::m_BoundaryLinesDirty |
Definition at line 104 of file CCmpTerritoryManager.cpp.
std::vector<SOverlayLine> CCmpTerritoryManager::m_DebugBoundaryLineNodes |
Definition at line 111 of file CCmpTerritoryManager.cpp.
TerritoryOverlay* CCmpTerritoryManager::m_DebugOverlay |
Definition at line 108 of file CCmpTerritoryManager.cpp.
size_t CCmpTerritoryManager::m_DirtyID |
Definition at line 232 of file CCmpTerritoryManager.cpp.
bool CCmpTerritoryManager::m_EnableLineDebugOverlays |
Enable node debugging overlays for boundary lines?
Definition at line 110 of file CCmpTerritoryManager.cpp.
u8 CCmpTerritoryManager::m_ImpassableCost |
Definition at line 83 of file CCmpTerritoryManager.cpp.
Definition at line 90 of file CCmpTerritoryManager.cpp.
bool CCmpTerritoryManager::m_TriggerEvent |
Definition at line 94 of file CCmpTerritoryManager.cpp.