Sun Class Reference

#include <Sun.h>

List of all members.

Public Member Functions

 Sun ()
virtual ~Sun ()
void draw ()
void setLightPosition (bool light0=false)
void setPosition (float sunRotXY, float sunRotYZ)
void generate ()
VectorgetPosition ()

Protected Attributes

Vector position_
GLTexture texture_


Detailed Description

Definition at line 28 of file Sun.h.


Constructor & Destructor Documentation

Sun::Sun (  ) 

Definition at line 38 of file Sun.cpp.

Sun::~Sun (  )  [virtual]

Definition at line 42 of file Sun.cpp.


Member Function Documentation

void Sun::draw (  ) 

Definition at line 101 of file Sun.cpp.

References GLState::BLEND_ON, GLState::DEPTH_OFF, GLTexture::draw(), GLCameraFrustum::drawBilboard(), GLCameraFrustum::instance(), ScorchedClient::instance(), LandscapeTex::nosunblend, position_, LandscapeTex::suncolor, texture_, and GLState::TEXTURE_ON.

Referenced by SkyDome::drawBackdrop().

void Sun::setLightPosition ( bool  light0 = false  ) 

Definition at line 78 of file Sun.cpp.

References TargetCamera::getCamera(), GLCamera::getCurrentPos(), getPosition(), MainCamera::getTarget(), GL_AMBIENT, GL_DIFFUSE, GL_LIGHT0, GL_LIGHT1, GL_POSITION, glLightfv(), MainCamera::instance(), ScorchedClient::instance(), LandscapeTex::skyambience, and LandscapeTex::skydiffuse.

Referenced by Landscape::actualDrawLandReflection(), Landscape::actualDrawLandShader(), RenderTargets::draw(), GLWWeaponModel::draw(), GLWTankModel::draw(), Sky::drawBackdrop(), GLWWindView::drawDisplay(), VisibilityPatchGrid::drawWater(), and Water2Renderer::drawWaterNoShaders().

void Sun::setPosition ( float  sunRotXY,
float  sunRotYZ 
)

Definition at line 46 of file Sun.cpp.

References LandscapeDefn::getLandscapeHeight(), LandscapeDefn::getLandscapeWidth(), ScorchedClient::instance(), and position_.

Referenced by Landscape::generate().

void Sun::generate (  ) 

Definition at line 59 of file Sun.cpp.

References DIALOG_ASSERT, file, S3D::getDataFile(), ScorchedClient::instance(), ImageFactory::loadImageHandle(), GLTexture::replace(), LandscapeTex::suntexture, LandscapeTex::suntexturemask, and texture_.

Referenced by Sky::generate().

Vector& Sun::getPosition (  )  [inline]

Definition at line 39 of file Sun.h.

References position_.

Referenced by SkyDome::drawBackdrop(), Landscape::drawShadows(), Landscape::generate(), LandSurround::generateList(), SkyRoof::makeNormal(), and setLightPosition().


Member Data Documentation

Vector Sun::position_ [protected]

Definition at line 42 of file Sun.h.

Referenced by draw(), getPosition(), and setPosition().

GLTexture Sun::texture_ [protected]

Definition at line 43 of file Sun.h.

Referenced by draw(), and generate().


The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:07 2009 for Scorched3D by  doxygen 1.5.3