UGKShadowCasting#

Inheritance Relationships#

Base Type#

Class Documentation#

class UGKShadowCasting : public UGKFogOfWarStrategy#

/rst

Notes

Maybe we can use this version to run on the dedicated server & client. In addition the client could generate rendering data to display a more appealing fog of war.

References

.. [1] Roguelike Vision Algorithms <>_ .. [2] Symmetric Shadowcasting <>_

/endrst

Public Functions

UGKShadowCasting()#
inline virtual bool SupportVisbilityQuery() const override#

return true when IsVisible is implemented

virtual bool IsVisible(FGenericTeamId SeerTeam, FVector Loc) const override#

return true if the Seer team sees the location

bool IsVisible3x3Extended(FGenericTeamId SeerTeam, FVector Loc) const#
virtual void Initialize(class AGKFogOfWarVolume *Volume) override#

Initialize the strategy internal data given its fog volume.

virtual void PreFactionFogDraw() override#
virtual void DrawFactionFogDebug(class AGKFogOfWarTeam *FactionFog) override#
virtual void DrawFactionFog(class AGKFogOfWarTeam *FactionFog) override#

Draw the fog of war for each factions.

void DrawFactionFogSingleThread(class AGKFogOfWarTeam *FactionFog)#
void DrawFactionFogParallel(class AGKFogOfWarTeam *FactionFog)#
void DrawFactionFogParallel_AsyncTask(class AGKFogOfWarTeam *FactionFog)#
virtual void PostFactionFogDraw(class AGKFogOfWarTeam *FactionFog)#
inline virtual bool SupportsParallelExecution() override#
virtual void Stop() override#

Stop fog of war drawing.

virtual void DrawLineOfSight(class AGKFogOfWarTeam *FactionFog, class UGKFogOfWarComponent *c) override#

Draw the line of sight using the right method.

void UpdateBlocking(class UGKFogOfWarComponent *c)#
void UpdateTextures(class AGKFogOfWarTeam *TeamFog)#
virtual UTexture2D *RetrieveBlockingTexture(UTexture2D *DestTexture = nullptr) override#
void ExtractLandscapeHeightMap()#
virtual class UTexture *GetFactionTexture(FName name, bool CreateRenderTarget = true) override#

Retrieve the Texture used to draw the fog of war for a given faction.

class UTexture2D *GetFactionTexture2D(FName name, bool CreateRenderTarget = true)#
class UTexture2D *GetPreviousFrameFactionTexture2D(FName name, bool bCreateRenderTarget = true)#
class UTexture2D *CreateTexture2D()#
virtual class UTexture *GetPreviousFrameFactionTexture(FName name, bool CreateRenderTarget = true)#

Retrieve the Texture used to draw the fog of war for a given faction.

void UpdatePreviousFrameTexturesTex(class AGKFogOfWarTeam *TeamFog)#
void UpdatePreviousFrameTextures(class AGKFogOfWarTeam *TeamFog)#
inline void SetVisible(FIntVector Location, uint8 TeamId)#

SetVisible marks a tile as visible, given its X and Y coordinates.

inline bool IsBlockingLight(FIntVector Location)#

BlocksLight takes X and Y coordinates of a tile and determines whether the given tile blocks the passage of light. The function must be able to accept coordinates that are out of bounds.

int GetDistance(FIntVector Origin, FIntVector Diff)#

GetDistance returns the distance from the point to the origin.

inline int GetDistanceSquared(FIntVector Origin, FIntVector Diff)#
inline bool IsPositionValid(FIntVector Pos) const#

Public Members

class ALandscape *Landscape#

Landscape we use to extract landscape height.

Protected Functions

bool TextureQuery_IsVisible(FGenericTeamId SeerTeam, FIntVector BufferPos) const#