Last change
on this file since 8935 was
8793,
checked in by patrick, 18 years ago
|
trunk: merged the weather engine branche to the trunk
|
File size:
925 bytes
|
Line | |
---|
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); |
---|
36 | |
---|
37 | private: |
---|
38 | |
---|
39 | typedef struct VertexInfo |
---|
40 | { |
---|
41 | float x,y,z; |
---|
42 | unsigned int color; |
---|
43 | float u, v; |
---|
44 | }; |
---|
45 | |
---|
46 | |
---|
47 | VertexInfo *planeVertices; |
---|
48 | int numPlaneVertices; |
---|
49 | |
---|
50 | int *indices; |
---|
51 | int numIndices; |
---|
52 | |
---|
53 | float pRadius; |
---|
54 | |
---|
55 | VertexInfo *vertices; |
---|
56 | int numVertices; |
---|
57 | |
---|
58 | GLuint texture; |
---|
59 | Shader* shader; |
---|
60 | }; |
---|
61 | |
---|
62 | #endif /* _SKYDOME_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.