vee_test_qt.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 
00003 /* COPYRIGHT
00004  *
00005  * This file is part of the Visual Effects Engine - VEE
00006  *
00007  * Read the "VEE-LICENSE" file for the license.
00008  *
00009  * Authors & Copyright:   
00010  *
00011  * Tommi Ilmonen, Tuukka Heikura, Marko Myllymaa and 
00012  * Janne Kontkanen 2001-2004
00013  *
00014  * Additional copyrights: Tekes 2003-2004
00015  *
00016  * firstname.lastname@hut.fi
00017  *
00018  */
00019 
00020 #ifndef VEE_TEST_QT_H
00021 #define VEE_TEST_QT_H
00022 
00023 #include <vee_gl_texture.h>
00024 #include <vee_qt.h>
00025 #include <vee_time.h>
00026 
00027 #include <Solar/GlMaterial.hpp>
00028 #include <Solar/GlRenderer.hpp>
00029 #include <Solar/GlDisplayLists.hpp>
00030 
00031 #include <vector>
00032 
00033 class VEE_RManRenderer;
00034 
00035 namespace Solar {
00036   class Model;
00037   class Object;
00038 
00039 } // namespace Solar
00040 
00041 class VEE_TestQt : public VEE_QtHidden
00042 {
00043 public:
00044   VEE_TestQt(VEE_Qt * host,
00045        VEE_SceneBox *box, 
00046        const char *rendermanFile,
00047        uint width, 
00048        uint height,
00049        VEE_GlRendererType type = VEE_GL_SL,
00050        QWidget *parent=0, 
00051        const char *name=0);
00052   virtual ~VEE_TestQt();
00053 
00054   void deleteSolarObjectsAndModels();
00055   
00056   void addModel(Solar::Model *model) { m_models.push_back(model); }
00057   void addObject(Solar::Object *object) { m_objects.push_back(object); }
00058   
00059   Solar::GlMaterialBank & materials() { return m_materials; }
00060   
00061   void setMtlFile(const std::string &f) { m_mtlFile = f; }
00062 
00063   static void loadMaterials(const std::string     &mtlFile, 
00064           VEE_GlTexture2DBank   *textures,
00065           Solar::GlMaterialBank *materials);
00066 
00067 protected:
00068   
00069   virtual void initializeGL();
00070 
00071   virtual void veeRender(bool clear = true);
00072 
00073   VEE_Time m_lastUpdate;
00074 
00075   std::vector<Solar::Model *>  m_models;
00076   std::vector<Solar::Object *> m_objects;
00077 
00078   VEE_GlTexture2DBank   m_textures;
00079   Solar::GlMaterialBank m_materials;
00080   Solar::GlRenderer     m_renderer;
00081   Solar::GlDisplayLists m_lists;
00082 
00083   std::string           m_mtlFile;
00084 
00085   VEE_RManRenderer *m_rmanRenderer;
00086 
00087   /* private:
00088      VEE_TestQt(const VEE_TestQt &) {} */
00089 };
00090 
00091 #endif

Generated on Mon Mar 12 21:09:01 2007 for VEE - The Visual Effects Engine by  doxygen 1.4.6