src/SkyDome.h

Go to the documentation of this file.
00001 /* Crown and Cutlass
00002  * Sky Dome Object Header
00003  */
00004 
00005 #if !defined ( _SKYDOME_H_ )
00006 #define _SKYDOMEI_H_
00007 
00008 #include <string>
00009 #include "GLee.h"
00010 
00011 using namespace std;
00012 
00013 class Texture;
00014 
00015 class SkyDome {
00016 public:
00017   SkyDome(float radius, int slices, int stacks, string textureName);
00018 
00019   ~SkyDome();
00020 
00021   // Draw the sky dome
00022   // time represents the time of day on a 24-clock (0 <= time < 24)
00023   void Draw(float time);
00024 
00025 private:
00026   // Display list to draw the sky dome
00027   GLuint m_list;
00028 
00029   // Texture to use for sky color
00030   Texture *m_colorTexture;
00031 
00032   // Actually draw the geometry for the dome
00033   void DrawDome(float radius, int slices, int stacks);
00034 
00035   // Convert from polar coords
00036   float GetX(float angle, float radiusAngle, float domeRadius);
00037   float GetZ(float angle, float radiusAngle, float domeRadius);
00038 
00039   // Gets the height of the dome at that radius
00040   float GetHeight(float domeRadius, float pointRadiusAngle);
00041 };
00042 
00043 #endif

Generated on Mon Jan 8 22:34:12 2007 for CrownandCutlass by  doxygen 1.4.7