#include <Sun.h>
Public Member Functions | |
| Sun () | |
| virtual | ~Sun () |
| void | draw () |
| void | setLightPosition (bool light0=false) |
| void | setPosition (float sunRotXY, float sunRotYZ) |
| void | generate () |
| Vector & | getPosition () |
Protected Attributes | |
| Vector | position_ |
| GLTexture | texture_ |
Definition at line 28 of file Sun.h.
| 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().
Vector Sun::position_ [protected] |
GLTexture Sun::texture_ [protected] |
1.5.3