89 light.spotCosCutoff =
static_cast<float>(Math::cos(Math::PI / 180.0f *
spotCutOff));
Color 4 definition class.
const array< float, 4 > & getArray() const
void set(float r, float g, float b, float a)
Sets this color by its components.
static Engine * getInstance()
Returns engine instance.
static TextureManager * getTextureManager()
Light()
Public default constructor.
float constantAttenuation
void update(int contextIdx)
Update light.
float quadraticAttenuation
void setSourceTexture(Texture *texture)
Returns light source texture.
int32_t lightSourceTextureId
Texture * lightSourceTexture
void removeTexture(Texture *texture)
Removes a texture from manager.
TextureManager_TextureManaged * addTexture(const string &id, bool &created)
Adds a texture to manager.
virtual void onUpdateLight(int contextIdx, int32_t lightId)=0
Update light.
Renderer_Light & getLight(int contextIdx, int32_t lightIdx)
Get light.
Matrix4x4 class representing matrix4x4 mathematical structure and operations for 3d space.
Vector3 class representing vector3 mathematical structure and operations with x, y,...
const array< float, 3 > & getArray() const
Vector3 & set(float x, float y, float z)
Sets this vector3 by its components.
Vector4 class representing vector4 mathematical structure and operations with x, y,...
Vector4 & set(float x, float y, float z, float w)
Sets this vector4 by its components.
const array< float, 4 > & getArray() const
virtual void releaseReference()
Releases a reference, thus decrementing the counter and delete it if reference counter is zero.