#include <C4FoW.h>
Public Member Functions | |
C4FoW () | |
~C4FoW () | |
C4Shader * | GetFramebufShader () |
C4Shader * | GetRenderShader () |
void | ClearDeletedLights () |
void | Add (C4Object *pObj) |
void | Remove (C4Object *pObj) |
void | Update (C4Rect r, C4Player *player) |
void | Invalidate (C4Rect r) |
void | Render (class C4FoWRegion *pRegion, const C4TargetFacet *pOnScreen, C4Player *pPlr, const StdProjectionMatrix &projectionMatrix) |
Public Attributes | |
C4FoWAmbient | Ambient |
This class holds all lights for the objects. It forwards the update, invalidation and render calls each to the lights.
|
default |
C4FoW::~C4FoW | ( | ) |
Definition at line 26 of file C4FoW.cpp.
References ClearDeletedLights().
void C4FoW::Add | ( | C4Object * | pObj | ) |
Updates the view range of the given object in its associated light or create a new light if none exists yet.
Definition at line 165 of file C4FoW.cpp.
References C4FoWLight::getNext(), C4FoWLight::getObj(), C4Object::lightColor, C4Object::lightFadeoutRange, C4Object::lightRange, Remove(), C4FoWLight::SetColor(), C4FoWLight::SetReach(), and C4PropList::Status.
Referenced by C4Object::UpdateLight().
void C4FoW::ClearDeletedLights | ( | ) |
Definition at line 34 of file C4FoW.cpp.
References C4FoWLight::getNext().
Referenced by Render(), and ~C4FoW().
C4Shader * C4FoW::GetFramebufShader | ( | ) |
Definition at line 47 of file C4FoW.cpp.
References C4Shader::AddFragmentSlices(), C4Shader::AddVertexSlices(), C4FoWFSA_Count, C4FoWFSA_Position, C4FoWFSA_TexCoord, C4FoWFSU_Count, C4FoWFSU_ProjectionMatrix, C4FoWFSU_Texture, C4Shader::ClearSlices(), C4Shader::Init(), and C4Shader::Initialised().
Referenced by C4FoWRegion::Render().
C4Shader * C4FoW::GetRenderShader | ( | ) |
Definition at line 106 of file C4FoW.cpp.
References C4Shader::AddFragmentSlices(), C4Shader::AddVertexSlices(), C4FoWRSA_Color, C4FoWRSA_Count, C4FoWRSA_Position, C4FoWRSU_Count, C4FoWRSU_ProjectionMatrix, C4FoWRSU_VertexOffset, C4Shader::ClearSlices(), C4Shader::Init(), and C4Shader::Initialised().
Referenced by Render().
void C4FoW::Invalidate | ( | C4Rect | r | ) |
Triggers the recalculation of all light beams within the given rectangle because the landscape changed.
Definition at line 221 of file C4FoW.cpp.
References C4FoWLight::getNext().
void C4FoW::Remove | ( | C4Object * | pObj | ) |
Removes the light associated with the given object, if any
Definition at line 201 of file C4FoW.cpp.
References C4FoWLight::getNext().
Referenced by Add(), and C4Object::StatusDeactivate().
void C4FoW::Render | ( | class C4FoWRegion * | pRegion, |
const C4TargetFacet * | pOnScreen, | ||
C4Player * | pPlr, | ||
const StdProjectionMatrix & | projectionMatrix | ||
) |
Definition at line 238 of file C4FoW.cpp.
References C4FoWRSU_ProjectionMatrix, C4ScriptGuiWindowActionID::Call, ClearDeletedLights(), C4FoWLight::getNext(), and GetRenderShader().
Referenced by C4FoWRegion::Render().
Update all light beams within the given rectangle
Definition at line 229 of file C4FoW.cpp.
References C4FoWLight::getNext().
Referenced by C4FoWRegion::Render().
C4FoWAmbient C4FoW::Ambient |
Definition at line 115 of file C4FoW.h.
Referenced by C4LandscapeRenderGL::Draw(), and CStdGL::SetupMultiBlt().