X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fmaterials%2Fpointlight.h;h=a49fbe0ef3de09b462cc54c44ad0d5e40b653be8;hp=074c8c37b61d208cdd76cf9a97a59bfa8b47c9b7;hb=HEAD;hpb=adc26a2e141a2853b6c5025130c46a46cece4b84 diff --git a/source/materials/pointlight.h b/source/materials/pointlight.h index 074c8c37..a49fbe0e 100644 --- a/source/materials/pointlight.h +++ b/source/materials/pointlight.h @@ -30,13 +30,9 @@ public: }; private: - Vector3 position; - float attenuation[3]; + Vector3 position = { 0.0f, 0.0f, 0.0f }; + float attenuation[3] = { 1.0f, 0.0f, 1.0f }; -public: - PointLight(); - -private: void update_matrix(); public: @@ -47,7 +43,10 @@ public: void set_position(const Vector3 &); const Vector3 &get_position(); + /** Sets the constant, linear and quadratic attentuation factors for the + light. */ void set_attenuation(float, float, float); + const float *get_attenuation() const { return attenuation; } protected: