00001 #pragma once 00002 00003 #ifndef SOURCELIGHT_H 00004 #define SOURCELIGHT_H 00005 00006 #include "Color.h" 00007 00009 class SourceLight 00010 { 00011 public: 00012 SourceLight(Color *_ambientColor, Color *_diffuseColor, Color *_specularColor, float *_specularExponent); 00013 ~SourceLight(); 00014 00015 Color *getAmbientColor(); 00016 Color *getDiffuseColor(); 00017 Color *getSpecularColor(); 00018 float getSpecularExponent(); 00019 float *getOrientation(); 00020 float *getGlobalDirection(); 00021 00022 void setAmbientColor(const float r, const float g, const float b); 00023 void setDiffuseColor(const float r, const float g, const float b); 00024 void setSpecularColor(const float r, const float g, const float b); 00025 void setSpecularExponent(float expo); 00026 void setOrientation(const float a11, const float a12, const float a13, const float a14, 00027 const float a21, const float a22, const float a23, const float a24, 00028 const float a31, const float a32, const float a33, const float a34, 00029 const float a41, const float a42, const float a43, const float a44); 00030 00031 private: 00033 Color *ambientColor; 00035 Color *specularColor; 00037 Color *diffuseColor; 00039 float *specularExponent; 00040 00042 float *orientation; 00044 float *globalDirection; 00046 float *initDirection; 00047 00048 void updateGloableDirection(); 00049 00050 }; 00051 #endif SOURCELIGHT_H