LLWLParamManager Class Reference

WindLight parameter manager class - what controls all the wind light shaders. More...

#include <llwlparammanager.h>

Collaboration diagram for LLWLParamManager:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LLWLParamManager ()
 ~LLWLParamManager ()
void loadPresets (const LLString &fileName)
 load a preset file
void savePresets (const LLString &fileName)
 save the preset file
void loadPreset (const LLString &name)
 load an individual preset into the sky
void savePreset (const LLString &name)
 save the parameter presets to file
void propagateParameters (void)
 Set shader uniforms dirty, so they'll update automatically.
void updateShaderUniforms (LLGLSLShader *shader)
 Update shader uniforms that have changed.
void resetAnimator (F32 curTime, bool run)
 setup the animator to run
void update (LLViewerCamera *cam)
 update information camera dependent parameters
LLVector4 getLightDir (void) const
LLVector4 getClampedLightDir (void) const
LLVector4 getRotatedLightDir (void) const
F32 getDomeOffset (void) const
 get the dome's offset
F32 getDomeRadius (void) const
 get the radius of the dome
bool addParamSet (const std::string &name, LLWLParamSet &param)
 add a param to the list
BOOL addParamSet (const std::string &name, LLSD const &param)
 add a param to the list
bool getParamSet (const std::string &name, LLWLParamSet &param)
 get a param from the list
bool setParamSet (const std::string &name, LLWLParamSet &param)
 set the param in the list with a new param
bool setParamSet (const std::string &name, LLSD const &param)
 set the param in the list with a new param
bool removeParamSet (const std::string &name, bool delete_from_disk)

Static Public Member Functions

static void initClass (void)
 Perform global initialization for this class.
static void cleanupClass ()
static LLWLParamManagerinstance ()

Public Attributes

LLWLAnimator mAnimator
LLVector4 mLightDir
 actual direction of the sun
LLVector4 mRotatedLightDir
 light norm adjusted so haze works correctly
LLVector4 mClampedLightDir
LLWLDayCycle mDay
LLWLParamSet mCurParams
F32 mSunDeltaYaw
 Sun Delta Terrain tweak variables.
WLFloatControl mWLGamma
F32 mSceneLightStrength
WLColorControl mBlueHorizon
 Atmospherics.
WLColorControl mHazeDensity
WLColorControl mBlueDensity
WLFloatControl mDensityMult
WLColorControl mHazeHorizon
WLFloatControl mMaxAlt
WLColorControl mLightnorm
 Lighting.
WLColorControl mSunlight
WLColorControl mAmbient
WLColorControl mGlow
WLColorControl mCloudColor
 Clouds.
WLColorControl mCloudMain
WLFloatControl mCloudCoverage
WLColorControl mCloudDetail
WLFloatControl mDistanceMult
WLFloatControl mCloudScale
F32 mDomeOffset
 sky dome
F32 mDomeRadius
std::map< std::string,
LLWLParamSet
mParamList

Static Private Attributes

static LLWLParamManagersInstance = NULL


Detailed Description

WindLight parameter manager class - what controls all the wind light shaders.

Definition at line 124 of file llwlparammanager.h.


Constructor & Destructor Documentation

LLWLParamManager::LLWLParamManager (  ) 

Definition at line 66 of file llwlparammanager.cpp.

Referenced by instance().

Here is the caller graph for this function:

LLWLParamManager::~LLWLParamManager (  ) 

Definition at line 103 of file llwlparammanager.cpp.


Member Function Documentation

void LLWLParamManager::loadPresets ( const LLString fileName  ) 

load a preset file

Definition at line 107 of file llwlparammanager.cpp.

References addParamSet(), LLSD::beginMap(), LLSD::emptyMap(), LLSD::endMap(), gDirUtilp, LLDir::getExpandedFilename(), LLDir::getNextFileInDir(), LL_DEBUGS2, LL_ENDL, LL_INFOS2, LL_PATH_APP_SETTINGS, llifstream, NULL, and LLSDSerialize::SIZE_UNLIMITED.

Referenced by instance().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWLParamManager::savePresets ( const LLString fileName  ) 

save the preset file

Definition at line 181 of file llwlparammanager.cpp.

References LLSD::emptyMap(), gDirUtilp, LLDir::getExpandedFilename(), LL_PATH_APP_SETTINGS, mParamList, and LLSDFormatter::OPTIONS_PRETTY.

Here is the call graph for this function:

void LLWLParamManager::loadPreset ( const LLString name  ) 

load an individual preset into the sky

Definition at line 203 of file llwlparammanager.cpp.

References addParamSet(), LLSD::emptyMap(), gDirUtilp, LLDir::getExpandedFilename(), getParamSet(), LL_PATH_APP_SETTINGS, llendl, llinfos, llwarns, mCurParams, mParamList, NULL, propagateParameters(), setParamSet(), and LLSDSerialize::SIZE_UNLIMITED.

Referenced by LLFloaterWindLight::onChangePresetName().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWLParamManager::savePreset ( const LLString name  ) 

save the parameter presets to file

Definition at line 247 of file llwlparammanager.cpp.

References LLSD::emptyMap(), gDirUtilp, LLDir::getExpandedFilename(), LL_PATH_APP_SETTINGS, mParamList, NULL, LLSDFormatter::OPTIONS_PRETTY, and propagateParameters().

Referenced by LLFloaterWindLight::newPromptCallback(), and LLFloaterWindLight::saveAlertCallback().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWLParamManager::propagateParameters ( void   ) 

void LLWLParamManager::updateShaderUniforms ( LLGLSLShader shader  ) 

void LLWLParamManager::resetAnimator ( F32  curTime,
bool  run 
)

setup the animator to run

Definition at line 436 of file llwlparammanager.cpp.

References mAnimator, mDay, LLWLDayCycle::mDayRate, LLWLDayCycle::mTimeMap, and LLWLAnimator::setTrack().

Referenced by instance(), LLFloaterDayCycle::onLoadDayCycle(), LLFloaterDayCycle::onRunAnimSky(), and LLFloaterDayCycle::syncTrack().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWLParamManager::update ( LLViewerCamera cam  ) 

LLVector4 LLWLParamManager::getLightDir ( void   )  const [inline]

Definition at line 272 of file llwlparammanager.h.

References mLightDir.

LLVector4 LLWLParamManager::getClampedLightDir ( void   )  const [inline]

Definition at line 277 of file llwlparammanager.h.

References mClampedLightDir.

LLVector4 LLWLParamManager::getRotatedLightDir ( void   )  const [inline]

Definition at line 282 of file llwlparammanager.h.

References mRotatedLightDir.

F32 LLWLParamManager::getDomeOffset ( void   )  const [inline]

get the dome's offset

Definition at line 262 of file llwlparammanager.h.

References mDomeOffset.

Referenced by LLVOSky::initAtmospherics(), and LLDrawPoolWLSky::render().

Here is the caller graph for this function:

F32 LLWLParamManager::getDomeRadius ( void   )  const [inline]

get the radius of the dome

Definition at line 267 of file llwlparammanager.h.

References mDomeRadius.

Referenced by LLVOWLSky::buildFanBuffer(), LLVOWLSky::buildStripsBuffer(), LLVOSky::initAtmospherics(), and LLDrawPoolWLSky::render().

Here is the caller graph for this function:

void LLWLParamManager::initClass ( void   )  [static]

Perform global initialization for this class.

Definition at line 424 of file llwlparammanager.cpp.

References instance().

Referenced by idle_startup().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWLParamManager::cleanupClass ( void   )  [static]

Definition at line 430 of file llwlparammanager.cpp.

References NULL, and sInstance.

Referenced by LLAppViewer::cleanup().

Here is the caller graph for this function:

bool LLWLParamManager::addParamSet ( const std::string &  name,
LLWLParamSet param 
)

add a param to the list

Definition at line 443 of file llwlparammanager.cpp.

References mParamList.

Referenced by loadPreset(), loadPresets(), and LLFloaterWindLight::newPromptCallback().

Here is the caller graph for this function:

BOOL LLWLParamManager::addParamSet ( const std::string &  name,
LLSD const &  param 
)

add a param to the list

Definition at line 456 of file llwlparammanager.cpp.

References FALSE, mParamList, and TRUE.

bool LLWLParamManager::getParamSet ( const std::string &  name,
LLWLParamSet param 
)

get a param from the list

Definition at line 471 of file llwlparammanager.cpp.

References LLWLParamSet::mName, and mParamList.

Referenced by LLWLDayCycle::changeKeyParam(), LLWLDayCycle::getKeyedParam(), instance(), LLWLDayCycle::loadDayCycle(), and loadPreset().

Here is the caller graph for this function:

bool LLWLParamManager::setParamSet ( const std::string &  name,
LLWLParamSet param 
)

set the param in the list with a new param

Definition at line 485 of file llwlparammanager.cpp.

References mParamList.

Referenced by loadPreset(), and LLFloaterWindLight::saveAlertCallback().

Here is the caller graph for this function:

bool LLWLParamManager::setParamSet ( const std::string &  name,
LLSD const &  param 
)

set the param in the list with a new param

Definition at line 492 of file llwlparammanager.cpp.

References LLSD::isMap(), and mParamList.

Here is the call graph for this function:

bool LLWLParamManager::removeParamSet ( const std::string &  name,
bool  delete_from_disk 
)

gets rid of a parameter and any references to it returns true if successful

Definition at line 505 of file llwlparammanager.cpp.

References LLDir::deleteFilesInDir(), gDirUtilp, LLDir::getExpandedFilename(), LLWLDayCycle::getKey(), LL_PATH_APP_SETTINGS, mDay, mParamList, NULL, and LLWLDayCycle::removeKey().

Referenced by LLFloaterWindLight::deleteAlertCallback().

Here is the call graph for this function:

Here is the caller graph for this function:

LLWLParamManager * LLWLParamManager::instance ( void   )  [static]

Definition at line 550 of file llwlparammanager.cpp.

References getParamSet(), LLWLParamManager(), LLWLDayCycle::loadDayCycle(), loadPresets(), mAnimator, mCurParams, mDay, LLWLAnimator::mUseLindenTime, NULL, resetAnimator(), and sInstance.

Referenced by LLGLSLShader::bind(), LLVOWLSky::buildFanBuffer(), LLVOWLSky::buildStripsBuffer(), LLVOSky::calcAtmospherics(), LLWLDayCycle::changeKeyParam(), LLFloaterWindLight::deactivateAnimator(), LLFloaterWindLight::deleteAlertCallback(), display_update_camera(), LLWLDayCycle::getKeyedParam(), LLWorldEnvSettings::handleEvent(), LLVOSky::initAtmospherics(), LLFloaterWindLight::initCallbacks(), initClass(), LLDrawPoolWLSky::LLDrawPoolWLSky(), LLFloaterDayCycle::LLFloaterDayCycle(), LLFloaterWindLight::LLFloaterWindLight(), LLVOSky::LLVOSky(), LLWLDayCycle::loadDayCycle(), LLFloaterWindLight::newPromptCallback(), LLFloaterEnvSettings::onChangeCloudCoverage(), LLFloaterEnvSettings::onChangeDayTime(), LLFloaterWindLight::onChangePresetName(), LLFloaterWindLight::onCloudScrollXMoved(), LLFloaterWindLight::onCloudScrollXToggled(), LLFloaterWindLight::onCloudScrollYMoved(), LLFloaterWindLight::onCloudScrollYToggled(), LLFloaterWindLight::onColorControlBMoved(), LLFloaterWindLight::onColorControlGMoved(), LLFloaterWindLight::onColorControlIMoved(), LLFloaterWindLight::onColorControlRMoved(), LLFloaterWindLight::onFloatControlMoved(), LLFloaterWindLight::onFloatTweakMoved(), LLFloaterWindLight::onGlowBMoved(), LLFloaterWindLight::onGlowRMoved(), LLFloaterDayCycle::onLoadDayCycle(), LLFloaterDayCycle::onRunAnimSky(), LLFloaterDayCycle::onSaveDayCycle(), LLFloaterWindLight::onSavePreset(), LLFloaterWindLight::onStarAlphaMoved(), LLFloaterDayCycle::onStopAnimSky(), LLFloaterWindLight::onSunMoved(), LLFloaterDayCycle::onTimeRateChanged(), LLFloaterDayCycle::onTimeSliderMoved(), LLFloaterEnvSettings::onUseEstateTime(), LLFloaterDayCycle::onUseLindenTime(), LLDrawPoolWLSky::render(), LLDrawPoolWLSky::renderStars(), LLFloaterWindLight::saveAlertCallback(), LLFloaterWindLight::syncMenu(), LLFloaterEnvSettings::syncMenu(), LLFloaterDayCycle::syncMenu(), LLFloaterDayCycle::syncSliderTrack(), LLFloaterDayCycle::syncTrack(), LLWLAnimator::update(), and LLWaterParamManager::updateShaderUniforms().

Here is the call graph for this function:


Member Data Documentation

actual direction of the sun

Definition at line 205 of file llwlparammanager.h.

Referenced by getLightDir(), propagateParameters(), and update().

light norm adjusted so haze works correctly

Definition at line 208 of file llwlparammanager.h.

Referenced by getRotatedLightDir(), update(), and updateShaderUniforms().

clamped light norm for shaders that are adversely affected when the sun goes below the horizon

Definition at line 213 of file llwlparammanager.h.

Referenced by getClampedLightDir(), propagateParameters(), and updateShaderUniforms().

Sun Delta Terrain tweak variables.

Definition at line 221 of file llwlparammanager.h.

Referenced by update().

Definition at line 224 of file llwlparammanager.h.

Referenced by LLVOSky::calcAtmospherics(), and updateShaderUniforms().

Atmospherics.

Definition at line 227 of file llwlparammanager.h.

Referenced by LLFloaterWindLight::initCallbacks(), and LLFloaterWindLight::syncMenu().

Lighting.

Definition at line 235 of file llwlparammanager.h.

Referenced by LLFloaterWindLight::initCallbacks().

Clouds.

Definition at line 241 of file llwlparammanager.h.

Referenced by LLFloaterWindLight::initCallbacks(), and LLFloaterWindLight::syncMenu().

sky dome

Definition at line 249 of file llwlparammanager.h.

Referenced by getDomeOffset().

Definition at line 250 of file llwlparammanager.h.

Referenced by getDomeRadius().

LLWLParamManager * LLWLParamManager::sInstance = NULL [static, private]

Definition at line 258 of file llwlparammanager.h.

Referenced by cleanupClass(), and instance().


The documentation for this class was generated from the following files:

Generated on Fri May 16 09:39:54 2008 for SecondLife by  doxygen 1.5.5