00001 #ifndef SCENE_ 00002 #define SCENE_ 00003 00004 #include <stdio.h> 00005 #include <windows.h> 00006 #include <GL/gl.h> 00007 #include <GL/glu.h> 00008 #include <GL/glut.h> 00009 00010 #include "GraphicalObject.h" 00011 #include "Light.h" 00012 00022 class Scene 00023 { 00024 public: 00028 Scene (); 00029 00033 ~Scene (); 00034 00039 virtual void Init () = NULL; 00040 00049 void Render (int time, int culling_mode, bool level_of_detail); 00050 00060 void Monitor (int time, Camera * monitor, int culling_mode, bool level_of_detail); 00061 00069 void CopyPosition (int time, Camera * destination); 00070 00074 void PrintToConsole (); 00075 00076 protected: 00082 void AddObject (GraphicalObject * obj); 00083 00085 Camera * camera; 00086 00087 private: 00088 00090 typedef struct GraphicalObjectElem 00091 { 00092 GraphicalObjectElem * next; 00093 GraphicalObject * graphical_object; 00094 }GraphicalObjectList; 00095 00097 GraphicalObjectList * first_object; 00098 00100 GraphicalObject * camera_object; 00101 00102 //-------------------------------------------------------------------------------------------------- 00103 // LIGHT MANAGEMENT 00104 //-------------------------------------------------------------------------------------------------- 00105 public: 00106 00107 protected: 00113 void AddLight (Light * light); 00114 00115 private: 00117 typedef struct LightElem 00118 { 00119 LightElem * next; 00120 Light * light; 00121 }LightList; 00122 00124 LightList * first_light; 00125 00130 void NextLightId (); 00131 00135 int current_light_id; 00136 00140 void TurnOffLights (); 00141 00147 void ApplyLights (int time); 00148 }; 00149 00150 #endif