nuclear@1: #include "light.h" nuclear@1: nuclear@1: Light::Light() nuclear@1: { nuclear@1: color.x = color.y = color.z = 1.0; nuclear@1: atten.x = 1.0; nuclear@1: atten.y = 0.0; nuclear@1: atten.z = 0.0; nuclear@1: } nuclear@1: nuclear@1: void Light::set_position(const Vector3 &pos) nuclear@1: { nuclear@1: this->pos = pos; nuclear@1: } nuclear@1: nuclear@1: const Vector3 &Light::get_position() const nuclear@1: { nuclear@1: return pos; nuclear@1: } nuclear@1: nuclear@1: nuclear@1: void Light::set_color(const Vector3 &color) nuclear@1: { nuclear@1: this->color = color; nuclear@1: } nuclear@1: nuclear@1: const Vector3 &Light::get_color() const nuclear@1: { nuclear@1: return color; nuclear@1: } nuclear@1: nuclear@1: nuclear@1: void Light::set_attenuation(const Vector3 &atten) nuclear@1: { nuclear@1: this->atten = atten; nuclear@1: } nuclear@1: nuclear@1: const Vector3 &Light::get_attenuation() const nuclear@1: { nuclear@1: return atten; nuclear@1: }