#include "light.h" void Optics::GetComponent(OpticComponent component,Vector3 &val) { switch (component) { case RAVEN_OPTICS_AMBIENT_COMPONENT: val=ambient; break; case RAVEN_OPTICS_DIFFUSE_COMPONENT: val=diffuse; break; case RAVEN_OPTICS_SPECULAR_COMPONENT: val=specular; break; default: break; }; } void Optics::GetComponent(OpticComponent component,Vector4 &val) { switch (component) { case RAVEN_OPTICS_AMBIENT_COMPONENT: val=Vector4(ambient,1.0); break; case RAVEN_OPTICS_DIFFUSE_COMPONENT: val=Vector4(diffuse,1.0); break; case RAVEN_OPTICS_SPECULAR_COMPONENT: val=Vector4(specular,1.0); break; default: break; }; } void Optics::SetComponent(OpticComponent component,const Vector3 &val) { switch (component) { case RAVEN_OPTICS_AMBIENT_COMPONENT: ambient=val; break; case RAVEN_OPTICS_DIFFUSE_COMPONENT: diffuse=val; break; case RAVEN_OPTICS_SPECULAR_COMPONENT: specular=val; break; default: break; }; } void Optics::SetComponent(OpticComponent component,const Vector4 &val) { switch (component) { case RAVEN_OPTICS_AMBIENT_COMPONENT: ambient=val.xyz(); break; case RAVEN_OPTICS_DIFFUSE_COMPONENT: diffuse=val.xyz(); break; case RAVEN_OPTICS_SPECULAR_COMPONENT: specular=val.xyz(); break; default: break; }; } void PointLight::Position(Vector3 pos) {position=pos;} Vector3 PointLight::Position() {return position;} void PointLight::Direction(Vector3 dir) {} Vector3 PointLight::Direction() {return Vector3();} void PointLight::Attenuation(float atten) {attenuation=atten;} float PointLight::Attenuation() {return attenuation;} void DirectionalLight::Position(Vector3 pos) {} Vector3 DirectionalLight::Position() {return Vector3();} void DirectionalLight::Direction(Vector3 dir) {direction=dir;} Vector3 DirectionalLight::Direction() {return direction;} void DirectionalLight::Attenuation(float atten) {} float DirectionalLight::Attenuation() {return 0;}