This class manages lightmaps, e.g. by "allocating" rectangular areas in larger bitmaps. More...
#include "LightMapMan.hpp"
Public Member Functions | |
LightMapManT () | |
The constructor. More... | |
~LightMapManT () | |
The destructor. More... | |
bool | Allocate (unsigned int SizeS, unsigned int SizeT, unsigned long &BitmapNr, unsigned int &PosS, unsigned int &PosT) |
Finds a position for a rectangular lightmap within LightMaps[LightMaps.Size()-1].Data. More... | |
void | InitTextures (const float Gamma, const int AmbientR, const int AmbientG, const int AmbientB) |
Initializes the MatSys textures in the Textures and Textures2 arrays. More... | |
Public Attributes | |
ArrayT< BitmapT * > | Bitmaps |
ArrayT< BitmapT * > | Bitmaps2 |
ArrayT< MatSys::TextureMapI * > | Textures |
ArrayT< MatSys::TextureMapI * > | Textures2 |
This class manages lightmaps, e.g. by "allocating" rectangular areas in larger bitmaps.
LightMapManT::LightMapManT | ( | ) |
The constructor.
LightMapManT::~LightMapManT | ( | ) |
The destructor.
bool LightMapManT::Allocate | ( | unsigned int | SizeS, |
unsigned int | SizeT, | ||
unsigned long & | BitmapNr, | ||
unsigned int & | PosS, | ||
unsigned int & | PosT | ||
) |
Finds a position for a rectangular lightmap within LightMaps[LightMaps.Size()-1].Data.
If no such position exists, a new, empty LightMapT is created and appended to the LightMaps. Returns true on success, false on failure (i.e. if SizeS>MAX_SIZE_S || SizeT>MAX_SIZE_T).
void LightMapManT::InitTextures | ( | const float | Gamma, |
const int | AmbientR, | ||
const int | AmbientG, | ||
const int | AmbientB | ||
) |
Initializes the MatSys textures in the Textures and Textures2 arrays.
Gamma correction by value Gamma is applied to the textures in Textures, but not in Textures2.