#include <C4FoWAmbient.h>
Public Member Functions | |
C4FoWAmbient () | |
~C4FoWAmbient () | |
void | Clear () |
void | SetBrightness (double brightness) |
double | GetBrightness () const |
void | CreateFromLandscape (const C4Landscape &landscape, double resolution, double radius, double full_coverage) |
void | UpdateFromLandscape (const C4Landscape &landscape, const C4Rect &update) |
void | GetFragTransform (const struct FLOAT_RECT &vpRect, const C4Rect &clipRect, const C4Rect &outRect, float ambientTransform[6]) const |
unsigned int | GetLandscapeWidth () const |
unsigned int | GetLandscapeHeight () const |
Public Attributes | |
GLuint | Tex {0} |
This class manages a texture that holds the ambient light intensity
Definition at line 29 of file C4FoWAmbient.h.
|
default |
C4FoWAmbient::~C4FoWAmbient | ( | ) |
Definition at line 90 of file C4FoWAmbient.cpp.
References Clear().
void C4FoWAmbient::Clear | ( | ) |
Definition at line 95 of file C4FoWAmbient.cpp.
References Tex.
Referenced by CreateFromLandscape(), and ~C4FoWAmbient().
void C4FoWAmbient::CreateFromLandscape | ( | const C4Landscape & | landscape, |
double | resolution, | ||
double | radius, | ||
double | full_coverage | ||
) |
Definition at line 107 of file C4FoWAmbient.cpp.
References Clear(), C4Landscape::GetHeight(), C4Landscape::GetWidth(), Landscape, LogF(), C4Draw::MaxTexSize, C4TimeMilliseconds::Now(), pDraw, Tex, and UpdateFromLandscape().
|
inline |
Definition at line 56 of file C4FoWAmbient.h.
Referenced by C4LandscapeRenderGL::Draw(), and CStdGL::SetupMultiBlt().
void C4FoWAmbient::GetFragTransform | ( | const struct FLOAT_RECT & | vpRect, |
const C4Rect & | clipRect, | ||
const C4Rect & | outRect, | ||
float | ambientTransform[6] | ||
) | const |
Definition at line 199 of file C4FoWAmbient.cpp.
References FLOAT_RECT::bottom, C4FragTransform::Get2x3(), C4Rect::Hgt, FLOAT_RECT::left, FLOAT_RECT::right, C4FragTransform::Scale(), FLOAT_RECT::top, C4FragTransform::Translate(), C4Rect::Wdt, C4Rect::x, and C4Rect::y.
Referenced by C4LandscapeRenderGL::Draw(), and CStdGL::SetupMultiBlt().
|
inline |
Definition at line 73 of file C4FoWAmbient.h.
|
inline |
Definition at line 72 of file C4FoWAmbient.h.
|
inline |
Definition at line 55 of file C4FoWAmbient.h.
void C4FoWAmbient::UpdateFromLandscape | ( | const C4Landscape & | landscape, |
const C4Rect & | update | ||
) |
Definition at line 142 of file C4FoWAmbient.cpp.
References C4ScriptGuiWindowPropertyName::bottom, CStdPalette::Colors, C4Landscape::GetHeight(), C4Landscape::GetWidth(), C4Rect::Hgt, Landscape, C4ScriptGuiWindowPropertyName::left, C4ScriptGuiWindowPropertyName::right, CSurface8::Save(), CSurface8::SetPix(), Tex, C4ScriptGuiWindowPropertyName::top, C4Rect::Wdt, C4Rect::x, and C4Rect::y.
Referenced by CreateFromLandscape().
GLuint C4FoWAmbient::Tex {0} |
Definition at line 36 of file C4FoWAmbient.h.
Referenced by Clear(), CreateFromLandscape(), C4LandscapeRenderGL::Draw(), CStdGL::SetupMultiBlt(), and UpdateFromLandscape().