| Rev | Line |   | 
|---|
| [8732] | 1 | /*! | 
|---|
 | 2 |  * @file skydome.h | 
|---|
 | 3 |  */ | 
|---|
 | 4 |  | 
|---|
 | 5 | #ifndef _SKYDOME_H | 
|---|
 | 6 | #define _SKYDOME_H | 
|---|
 | 7 |  | 
|---|
 | 8 | /* INCLUDES */ | 
|---|
 | 9 | #include "world_entity.h" | 
|---|
 | 10 | #include "shader.h" | 
|---|
 | 11 |  | 
|---|
 | 12 | //   typedef struct VERTEX | 
|---|
 | 13 | // { | 
|---|
 | 14 | //   float x,y,z; | 
|---|
 | 15 | //   unsigned int color; | 
|---|
 | 16 | //   float u, v; | 
|---|
 | 17 | // }  ; | 
|---|
 | 18 |  | 
|---|
 | 19 |  | 
|---|
 | 20 | //! A Class to handle a SkyDome | 
|---|
 | 21 | class Skydome : public WorldEntity | 
|---|
 | 22 | { | 
|---|
 | 23 | public: | 
|---|
 | 24 |   Skydome(); | 
|---|
 | 25 |  | 
|---|
 | 26 |   virtual ~Skydome(); | 
|---|
 | 27 |  | 
|---|
 | 28 |   void init(); | 
|---|
 | 29 |   virtual void draw() const; | 
|---|
 | 30 |  | 
|---|
 | 31 |   void generateSkyPlane(int divisions, float planetRadius, float atmosphereRadius, | 
|---|
 | 32 |                         float hTile, float vTile); | 
|---|
 | 33 |    | 
|---|
 | 34 |   void setShader(Shader* shader); | 
|---|
 | 35 |   void setTexture(GLuint texture); | 
|---|
| [9006] | 36 |    | 
|---|
 | 37 |   void activate(); | 
|---|
 | 38 |   void deactivate(); | 
|---|
| [8732] | 39 |  | 
|---|
 | 40 | private: | 
|---|
 | 41 |    | 
|---|
 | 42 |   typedef struct VertexInfo | 
|---|
 | 43 |   { | 
|---|
 | 44 |     float x,y,z; | 
|---|
 | 45 |     unsigned int color; | 
|---|
 | 46 |     float u, v; | 
|---|
 | 47 |   }; | 
|---|
 | 48 |  | 
|---|
| [9006] | 49 |   bool activateDome; | 
|---|
| [8732] | 50 |    | 
|---|
 | 51 |   VertexInfo *planeVertices; | 
|---|
 | 52 |   int numPlaneVertices; | 
|---|
 | 53 |  | 
|---|
 | 54 |   int *indices; | 
|---|
 | 55 |   int numIndices; | 
|---|
 | 56 |  | 
|---|
 | 57 |   float pRadius; | 
|---|
 | 58 |  | 
|---|
 | 59 |   VertexInfo *vertices; | 
|---|
 | 60 |   int numVertices; | 
|---|
 | 61 |    | 
|---|
 | 62 |   GLuint texture; | 
|---|
 | 63 |   Shader* shader; | 
|---|
 | 64 | }; | 
|---|
 | 65 |  | 
|---|
 | 66 | #endif  /* _SKYDOME_H */ | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.