Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Sky.h

00001 /*
00002   File: Sky.h
00003 
00004   Copyright(C) C. Kotterink, Computed Graphics
00005 */
00006 #ifndef SKY_H
00007 #define SKY_H
00008 
00009 #include<Object.h>
00010 
00011 class World;
00012 
00015 class Sky : public Object
00016 {
00017 public:
00018     Sky();
00019 
00020     void renderShine(const World &world, RenderContext &rc);
00021     unsigned int createTexture(const string &name);
00022 
00023     // Object
00024     bool update(World &world);
00025     void render(
00026         RenderContext &rc,
00027         RenderContext::Visibility visibility = RenderContext::PartlyVisible
00028     );
00029     void write(WDFFile &f);
00030     void readChunk(WDFFile::Chunk &chunk, WDFFile &f);
00031 
00032 protected:
00035     class Flare {
00036         friend Sky;
00037     public:
00038         Flare() {}
00039         Flare(unsigned int t, const Color4 &c, float s, float pos)
00040             : texture(t), color(c), size(s), position(pos) {}
00041         void render();
00042     private:
00043         unsigned int texture;
00044         Color4 color;
00045         float size;
00046         float position;
00047     };
00048 private:
00049     void initializeFlares();
00050 
00051     Vertex3 sun;
00052     Vertex3 sunRenderPosition;
00053 };
00054 #endif

This documentation was generated using doxygen. If you have any comments or additions please mail me.