00001 #ifndef LIGHTS_H_ 00002 #define LIGHTS_H_ 00003 00004 #include "glwx.h" 00005 00006 class Lights { 00007 00008 00009 public: 00010 00011 Lights(); 00012 00013 bool Init(); 00014 void Draw(); 00015 00016 void SetNumberOfLights(int num); 00017 void SetDistanceBetweenLights(double distance); 00018 void SetHeightAboveGround(double height); 00019 void SetViewDistance(double distance); 00020 void SetDrawLines(bool flag); 00021 void SetUseDepthBuffer(bool flag); 00022 00023 void Reset(); 00024 00025 void MouseDown(); 00026 void MouseUp(); 00027 void MouseMove(int x, int y); 00028 00029 int GetNumberOfLights(); 00030 double GetDistanceBetweenLights(); 00031 double GetHeightAboveGround(); 00032 double GetP1Brightness(); 00033 double GetP2Brightness(); 00034 double GetPercentDifference(); 00035 00036 00037 private: 00038 00039 bool drawLines; 00040 int numLights; 00041 double distance; 00042 double height; 00043 double p1Brightness; 00044 double p2Brightness; 00045 double percentDifference; 00046 Texture lightTex; 00047 Texture textures_skybox[6]; 00048 double cameraPosition[3]; 00049 double lookPosition[3]; 00050 bool mouseIsDown; 00051 bool isWireframe; 00052 bool useDepthBuffer; 00053 00054 void DrawLights(); 00055 void DrawFloor(); 00056 void DrawLines(); 00057 00058 void CalculateBrightness(); 00059 00060 00061 00062 00063 }; 00064 00065 #endif