BACKDROP Class Reference

#include <backdrop.h>

Collaboration diagram for BACKDROP:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BACKDROP ()
 ~BACKDROP ()
void Init ()
void Draw (VERTEX tersize)
void DrawSky (double daytime, float transparency)
void DrawSkyGradient (double daytime, float transparency, GLdouble *temp_matrix)
void DrawSun (double daytime, float transparency, GLdouble *temp_matrix)
void DrawMoon (double daytime, float transparency, GLdouble *temp_matrix)
void DrawClouds (double daytime, float transparency, GLdouble *temp_matrix)
void DrawStars (double daytime, float transparency, GLdouble *temp_matrix)
void SetFogStrength (float density)
void RefreshFog ()
void GetHorizonColor (float *color3)
void GetSkyColor (float *color3)
void SetCloudCover (int newcloudthresh)
void SetWindoffset (float windoffset_x, float windoffset_z)
void DrawRain (float day_time)
void DeInit ()

Public Attributes

float sunpos_lng
float sunpos_lat
float moonpos_lng
float moonpos_lat

Private Member Functions

void DrawDrop (VERTEX pos, float rndperm, float yscale, float zheight)

Private Attributes

TEXTURE_HANDLE sun_texture
TEXTURE_HANDLE sun_texture_ref
TEXTURE_HANDLE sky_texture
TEXTURE_HANDLE rain_texture
TEXTURE_HANDLE cloud_texture
TEXTURE_HANDLE moon_texture
TEXTURE_HANDLE stars_texture
SDL_Surface * sky_tex_img
ofstream error_log
bool volumetricfog
float fogdensity
float daytime_cache
float windx
float windz
int cloudthresh
bool initdone
string TEXTURE_PATH

Detailed Description

Definition at line 30 of file backdrop.h.


Constructor & Destructor Documentation

BACKDROP::BACKDROP  ) 
 

Definition at line 3 of file backdrop.cpp.

References error_log, initdone, NULL, and sky_tex_img.

BACKDROP::~BACKDROP  ) 
 

Definition at line 12 of file backdrop.cpp.

References error_log, and verbose_output.


Member Function Documentation

void BACKDROP::DeInit  ) 
 

Definition at line 20 of file backdrop.cpp.

References cloud_texture, initdone, moon_texture, rain_texture, sky_tex_img, sky_texture, stars_texture, sun_texture, sun_texture_ref, and TEXTURE_HANDLE::Unload().

Referenced by UnloadWorld().

void BACKDROP::Draw VERTEX  tersize  ) 
 

Definition at line 250 of file backdrop.cpp.

void BACKDROP::DrawClouds double  daytime,
float  transparency,
GLdouble *  temp_matrix
 

Definition at line 565 of file backdrop.cpp.

References TEXTURE_HANDLE::Activate(), cam, cloud_texture, cloudthresh, fogdensity, WEATHER::GetCloudCover(), Vamos_Geometry::pi, CAMERA::position, RefreshFog(), QUATERNION::RotateVec(), QUATERNION::SetAxisAngle(), SetFogStrength(), sunpos_lat, weathersystem, windx, windz, VERTEX::x, VERTEX::y, and VERTEX::z.

Referenced by DrawSky().

void BACKDROP::DrawDrop VERTEX  pos,
float  rndperm,
float  yscale,
float  zheight
[private]
 

Definition at line 1181 of file backdrop.cpp.

References VERTEX::x, VERTEX::y, and VERTEX::z.

Referenced by DrawRain().

void BACKDROP::DrawMoon double  daytime,
float  transparency,
GLdouble *  temp_matrix
 

Definition at line 1207 of file backdrop.cpp.

Referenced by DrawSky().

void BACKDROP::DrawRain float  day_time  ) 
 

Definition at line 1115 of file backdrop.cpp.

References TEXTURE_HANDLE::Activate(), cam, CAMERA::dir, DrawDrop(), WEATHER::GetRainDrops(), rain_texture, QUATERNION::RotateVec(), weathersystem, VERTEX::x, VERTEX::y, and VERTEX::z.

void BACKDROP::DrawSky double  daytime,
float  transparency
 

Definition at line 301 of file backdrop.cpp.

References cam, daytime_cache, DrawClouds(), DrawMoon(), DrawSkyGradient(), DrawStars(), DrawSun(), EARTH_RADIUS, QUATERNION::GetMat(), moonpos_lat, CAMERA::position, QUATERNION::SetAxisAngle(), sunpos_lat, VERTEX::x, VERTEX::y, and VERTEX::z.

void BACKDROP::DrawSkyGradient double  daytime,
float  transparency,
GLdouble *  temp_matrix
 

Definition at line 342 of file backdrop.cpp.

References TEXTURE_HANDLE::Activate(), Vamos_Geometry::pi, QUATERNION::RotateVec(), QUATERNION::SetAxisAngle(), sky_texture, VERTEX::x, VERTEX::y, and VERTEX::z.

Referenced by DrawSky().

void BACKDROP::DrawStars double  daytime,
float  transparency,
GLdouble *  temp_matrix
 

Definition at line 775 of file backdrop.cpp.

References TEXTURE_HANDLE::Activate(), GetSkyColor(), and stars_texture.

Referenced by DrawSky().

void BACKDROP::DrawSun double  daytime,
float  transparency,
GLdouble *  temp_matrix
 

Definition at line 469 of file backdrop.cpp.

Referenced by DrawSky().

void BACKDROP::GetHorizonColor float *  color3  ) 
 

Definition at line 1040 of file backdrop.cpp.

References pix32::a, pix32::b, daytime_cache, pix32::g, pix32::r, and sky_tex_img.

Referenced by RefreshFog().

void BACKDROP::GetSkyColor float *  color3  ) 
 

Definition at line 1068 of file backdrop.cpp.

References pix32::a, pix32::b, daytime_cache, pix32::g, pix32::r, and sky_tex_img.

Referenced by DrawStars().

void BACKDROP::Init  ) 
 

Definition at line 49 of file backdrop.cpp.

References cloud_texture, fogdensity, SETTINGS::Get(), SETTINGS::GetFullDataPath(), TEXTURE_HANDLE::Load(), moon_texture, moonpos_lat, moonpos_lng, rain_texture, settings, sky_tex_img, sky_texture, stars_texture, sun_texture, sun_texture_ref, sunpos_lat, and sunpos_lng.

Referenced by ChangeDisplay(), and LoadWorld().

void BACKDROP::RefreshFog  ) 
 

Definition at line 991 of file backdrop.cpp.

References cloudthresh, and GetHorizonColor().

Referenced by DrawClouds(), and drawGLScene().

void BACKDROP::SetCloudCover int  newcloudthresh  ) 
 

Definition at line 1110 of file backdrop.cpp.

References cloudthresh.

void BACKDROP::SetFogStrength float  density  ) 
 

Definition at line 1098 of file backdrop.cpp.

References fogdensity.

Referenced by DrawClouds(), and drawGLScene().

void BACKDROP::SetWindoffset float  windoffset_x,
float  windoffset_z
 

Definition at line 1104 of file backdrop.cpp.

References windx, and windz.


Member Data Documentation

TEXTURE_HANDLE BACKDROP::cloud_texture [private]
 

Definition at line 33 of file backdrop.h.

Referenced by DeInit(), DrawClouds(), and Init().

int BACKDROP::cloudthresh [private]
 

Definition at line 41 of file backdrop.h.

Referenced by DrawClouds(), RefreshFog(), and SetCloudCover().

float BACKDROP::daytime_cache [private]
 

Definition at line 39 of file backdrop.h.

Referenced by DrawSky(), GetHorizonColor(), and GetSkyColor().

ofstream BACKDROP::error_log [private]
 

Definition at line 36 of file backdrop.h.

Referenced by BACKDROP(), and ~BACKDROP().

float BACKDROP::fogdensity [private]
 

Definition at line 38 of file backdrop.h.

Referenced by DrawClouds(), Init(), and SetFogStrength().

bool BACKDROP::initdone [private]
 

Definition at line 44 of file backdrop.h.

Referenced by BACKDROP(), and DeInit().

TEXTURE_HANDLE BACKDROP::moon_texture [private]
 

Definition at line 33 of file backdrop.h.

Referenced by DeInit(), and Init().

float BACKDROP::moonpos_lat
 

Definition at line 71 of file backdrop.h.

Referenced by DrawSky(), and Init().

float BACKDROP::moonpos_lng
 

Definition at line 70 of file backdrop.h.

Referenced by Init().

TEXTURE_HANDLE BACKDROP::rain_texture [private]
 

Definition at line 33 of file backdrop.h.

Referenced by DeInit(), DrawRain(), and Init().

SDL_Surface* BACKDROP::sky_tex_img [private]
 

Definition at line 35 of file backdrop.h.

Referenced by BACKDROP(), DeInit(), GetHorizonColor(), GetSkyColor(), and Init().

TEXTURE_HANDLE BACKDROP::sky_texture [private]
 

Definition at line 33 of file backdrop.h.

Referenced by DeInit(), DrawSkyGradient(), and Init().

TEXTURE_HANDLE BACKDROP::stars_texture [private]
 

Definition at line 33 of file backdrop.h.

Referenced by DeInit(), DrawStars(), and Init().

TEXTURE_HANDLE BACKDROP::sun_texture [private]
 

Definition at line 33 of file backdrop.h.

Referenced by DeInit(), and Init().

TEXTURE_HANDLE BACKDROP::sun_texture_ref [private]
 

Definition at line 33 of file backdrop.h.

Referenced by DeInit(), and Init().

float BACKDROP::sunpos_lat
 

Definition at line 68 of file backdrop.h.

Referenced by DrawClouds(), DrawSky(), Init(), and Update().

float BACKDROP::sunpos_lng
 

Definition at line 67 of file backdrop.h.

Referenced by Init().

string BACKDROP::TEXTURE_PATH [private]
 

Definition at line 46 of file backdrop.h.

bool BACKDROP::volumetricfog [private]
 

Definition at line 37 of file backdrop.h.

float BACKDROP::windx [private]
 

Definition at line 40 of file backdrop.h.

Referenced by DrawClouds(), and SetWindoffset().

float BACKDROP::windz [private]
 

Definition at line 40 of file backdrop.h.

Referenced by DrawClouds(), and SetWindoffset().


The documentation for this class was generated from the following files:
Generated on Thu Oct 19 04:11:43 2006 by  doxygen 1.4.6