DeferredRenderer 1.0
|
00001 #ifndef SCENE_H 00002 #define SCENE_H 00003 00004 #include "string" 00005 #include "ngl/TransformStack.h" 00006 #include "ngl/Matrix.h" 00007 #include "Frustum.h" 00008 #include "ngl/Obj.h" 00009 #include "PointLight.h" 00010 #include "ngl/NCCABinMesh.h" 00011 #include "ngl/Obj.h" 00012 00013 //struct GameObject{ 00014 // ngl::Obj geo; 00015 // GLuint texID; 00016 // ngl::Vector trans,rot,scale; 00017 //}; 00018 00025 class Scene 00026 { 00027 public: 00028 00031 Scene(int _lightNum); 00032 00034 ~Scene(); 00035 00037 void init(); 00038 00041 void moveLights(const float &_time); 00042 00046 void drawLights(const ngl::Vector &_camPos, unsigned int _pointLightVAO); 00047 00048 void loadTexture(const char* _texName, GLuint &_texID); 00049 00053 void draw(const std::string &_shaderName, const Frustum &_f, bool turntable); 00054 private: 00055 void addGameObject( 00056 const std::string &_obj, 00057 const char* _tex, 00058 const ngl::Vector &_trans, 00059 const ngl::Vector &_rot, 00060 const ngl::Vector &_scale 00061 ); 00062 00063 void setupLights(); 00064 00065 GLuint m_blankTex; 00066 00067 //std::vector<GameObject> m_gameObjects; 00068 00070 unsigned int m_lightVAO; 00071 00073 std::vector<PointLight> m_pointlights; 00074 00075 float m_ySpin; 00076 00077 ngl::Matrix m_baseTrans; 00078 }; 00079 00080 #endif // SCENE_H