summaryrefslogtreecommitdiff
path: root/indra/newview/llpaneleditsky.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpaneleditsky.cpp')
-rw-r--r--indra/newview/llpaneleditsky.cpp92
1 files changed, 46 insertions, 46 deletions
diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp
index 5255b3763c..ea2b2ba944 100644
--- a/indra/newview/llpaneleditsky.cpp
+++ b/indra/newview/llpaneleditsky.cpp
@@ -248,7 +248,7 @@ void LLPanelSettingsSkyAtmosTab::onBlueDensityChanged()
void LLPanelSettingsSkyAtmosTab::onHazeHorizonChanged()
{
if (!mSkySettings) return;
- mSkySettings->setHazeHorizon(getChild<LLUICtrl>(FIELD_SKY_HAZE_HORIZON)->getValue().asReal());
+ mSkySettings->setHazeHorizon((F32)getChild<LLUICtrl>(FIELD_SKY_HAZE_HORIZON)->getValue().asReal());
mSkySettings->update();
setIsDirty();
}
@@ -256,7 +256,7 @@ void LLPanelSettingsSkyAtmosTab::onHazeHorizonChanged()
void LLPanelSettingsSkyAtmosTab::onHazeDensityChanged()
{
if (!mSkySettings) return;
- mSkySettings->setHazeDensity(getChild<LLUICtrl>(FIELD_SKY_HAZE_DENSITY)->getValue().asReal());
+ mSkySettings->setHazeDensity((F32)getChild<LLUICtrl>(FIELD_SKY_HAZE_DENSITY)->getValue().asReal());
mSkySettings->update();
setIsDirty();
}
@@ -264,7 +264,7 @@ void LLPanelSettingsSkyAtmosTab::onHazeDensityChanged()
void LLPanelSettingsSkyAtmosTab::onSceneGammaChanged()
{
if (!mSkySettings) return;
- mSkySettings->setGamma(getChild<LLUICtrl>(FIELD_SKY_SCENE_GAMMA)->getValue().asReal());
+ mSkySettings->setGamma((F32)getChild<LLUICtrl>(FIELD_SKY_SCENE_GAMMA)->getValue().asReal());
mSkySettings->update();
setIsDirty();
}
@@ -272,7 +272,7 @@ void LLPanelSettingsSkyAtmosTab::onSceneGammaChanged()
void LLPanelSettingsSkyAtmosTab::onDensityMultipChanged()
{
if (!mSkySettings) return;
- F32 density_mult = getChild<LLUICtrl>(FIELD_SKY_DENSITY_MULTIP)->getValue().asReal();
+ F32 density_mult = (F32)getChild<LLUICtrl>(FIELD_SKY_DENSITY_MULTIP)->getValue().asReal();
density_mult *= SLIDER_SCALE_DENSITY_MULTIPLIER;
mSkySettings->setDensityMultiplier(density_mult);
mSkySettings->update();
@@ -282,7 +282,7 @@ void LLPanelSettingsSkyAtmosTab::onDensityMultipChanged()
void LLPanelSettingsSkyAtmosTab::onDistanceMultipChanged()
{
if (!mSkySettings) return;
- mSkySettings->setDistanceMultiplier(getChild<LLUICtrl>(FIELD_SKY_DISTANCE_MULTIP)->getValue().asReal());
+ mSkySettings->setDistanceMultiplier((F32)getChild<LLUICtrl>(FIELD_SKY_DISTANCE_MULTIP)->getValue().asReal());
mSkySettings->update();
setIsDirty();
}
@@ -290,7 +290,7 @@ void LLPanelSettingsSkyAtmosTab::onDistanceMultipChanged()
void LLPanelSettingsSkyAtmosTab::onMaxAltChanged()
{
if (!mSkySettings) return;
- mSkySettings->setMaxY(getChild<LLUICtrl>(FIELD_SKY_MAX_ALT)->getValue().asReal());
+ mSkySettings->setMaxY((F32)getChild<LLUICtrl>(FIELD_SKY_MAX_ALT)->getValue().asReal());
mSkySettings->update();
setIsDirty();
}
@@ -298,7 +298,7 @@ void LLPanelSettingsSkyAtmosTab::onMaxAltChanged()
void LLPanelSettingsSkyAtmosTab::onMoistureLevelChanged()
{
if (!mSkySettings) return;
- F32 moisture_level = getChild<LLUICtrl>(FIELD_SKY_DENSITY_MOISTURE_LEVEL)->getValue().asReal();
+ F32 moisture_level = (F32)getChild<LLUICtrl>(FIELD_SKY_DENSITY_MOISTURE_LEVEL)->getValue().asReal();
mSkySettings->setSkyMoistureLevel(moisture_level);
mSkySettings->update();
setIsDirty();
@@ -307,7 +307,7 @@ void LLPanelSettingsSkyAtmosTab::onMoistureLevelChanged()
void LLPanelSettingsSkyAtmosTab::onDropletRadiusChanged()
{
if (!mSkySettings) return;
- F32 droplet_radius = getChild<LLUICtrl>(FIELD_SKY_DENSITY_DROPLET_RADIUS)->getValue().asReal();
+ F32 droplet_radius = (F32)getChild<LLUICtrl>(FIELD_SKY_DENSITY_DROPLET_RADIUS)->getValue().asReal();
mSkySettings->setSkyDropletRadius(droplet_radius);
mSkySettings->update();
setIsDirty();
@@ -316,7 +316,7 @@ void LLPanelSettingsSkyAtmosTab::onDropletRadiusChanged()
void LLPanelSettingsSkyAtmosTab::onIceLevelChanged()
{
if (!mSkySettings) return;
- F32 ice_level = getChild<LLUICtrl>(FIELD_SKY_DENSITY_ICE_LEVEL)->getValue().asReal();
+ F32 ice_level = (F32)getChild<LLUICtrl>(FIELD_SKY_DENSITY_ICE_LEVEL)->getValue().asReal();
mSkySettings->setSkyIceLevel(ice_level);
mSkySettings->update();
setIsDirty();
@@ -325,7 +325,7 @@ void LLPanelSettingsSkyAtmosTab::onIceLevelChanged()
void LLPanelSettingsSkyAtmosTab::onReflectionProbeAmbianceChanged()
{
if (!mSkySettings) return;
- F32 ambiance = getChild<LLUICtrl>(FIELD_REFLECTION_PROBE_AMBIANCE)->getValue().asReal();
+ F32 ambiance = (F32)getChild<LLUICtrl>(FIELD_REFLECTION_PROBE_AMBIANCE)->getValue().asReal();
mSkySettings->setReflectionProbeAmbiance(ambiance);
mSkySettings->update();
@@ -446,7 +446,7 @@ void LLPanelSettingsSkyCloudTab::onCloudColorChanged()
void LLPanelSettingsSkyCloudTab::onCloudCoverageChanged()
{
if (!mSkySettings) return;
- mSkySettings->setCloudShadow(getChild<LLUICtrl>(FIELD_SKY_CLOUD_COVERAGE)->getValue().asReal());
+ mSkySettings->setCloudShadow((F32)getChild<LLUICtrl>(FIELD_SKY_CLOUD_COVERAGE)->getValue().asReal());
mSkySettings->update();
setIsDirty();
}
@@ -454,14 +454,14 @@ void LLPanelSettingsSkyCloudTab::onCloudCoverageChanged()
void LLPanelSettingsSkyCloudTab::onCloudScaleChanged()
{
if (!mSkySettings) return;
- mSkySettings->setCloudScale(getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCALE)->getValue().asReal());
+ mSkySettings->setCloudScale((F32)getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCALE)->getValue().asReal());
setIsDirty();
}
void LLPanelSettingsSkyCloudTab::onCloudVarianceChanged()
{
if (!mSkySettings) return;
- mSkySettings->setCloudVariance(getChild<LLUICtrl>(FIELD_SKY_CLOUD_VARIANCE)->getValue().asReal());
+ mSkySettings->setCloudVariance((F32)getChild<LLUICtrl>(FIELD_SKY_CLOUD_VARIANCE)->getValue().asReal());
setIsDirty();
}
@@ -484,9 +484,9 @@ void LLPanelSettingsSkyCloudTab::onCloudMapChanged()
void LLPanelSettingsSkyCloudTab::onCloudDensityChanged()
{
if (!mSkySettings) return;
- LLColor3 density(getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_X)->getValue().asReal(),
- getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_Y)->getValue().asReal(),
- getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_D)->getValue().asReal());
+ LLColor3 density((F32)getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_X)->getValue().asReal(),
+ (F32)getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_Y)->getValue().asReal(),
+ (F32)getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_D)->getValue().asReal());
mSkySettings->setCloudPosDensity1(density);
setIsDirty();
@@ -495,9 +495,9 @@ void LLPanelSettingsSkyCloudTab::onCloudDensityChanged()
void LLPanelSettingsSkyCloudTab::onCloudDetailChanged()
{
if (!mSkySettings) return;
- LLColor3 detail(getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_X)->getValue().asReal(),
- getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_Y)->getValue().asReal(),
- getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_D)->getValue().asReal());
+ LLColor3 detail((F32)getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_X)->getValue().asReal(),
+ (F32)getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_Y)->getValue().asReal(),
+ (F32)getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_D)->getValue().asReal());
mSkySettings->setCloudPosDensity2(detail);
setIsDirty();
@@ -626,7 +626,7 @@ void LLPanelSettingsSkySunMoonTab::onSunMoonColorChanged()
void LLPanelSettingsSkySunMoonTab::onGlowChanged()
{
if (!mSkySettings) return;
- LLColor3 glow(getChild<LLUICtrl>(FIELD_SKY_GLOW_SIZE)->getValue().asReal(), 0.0f, getChild<LLUICtrl>(FIELD_SKY_GLOW_FOCUS)->getValue().asReal());
+ LLColor3 glow((F32)getChild<LLUICtrl>(FIELD_SKY_GLOW_SIZE)->getValue().asReal(), 0.0f, (F32)getChild<LLUICtrl>(FIELD_SKY_GLOW_FOCUS)->getValue().asReal());
// takes 0 - 1.99 UI range -> 40 -> 0.2 range
glow.mV[0] = (2.0f - glow.mV[0]) * SLIDER_SCALE_GLOW_R;
@@ -640,7 +640,7 @@ void LLPanelSettingsSkySunMoonTab::onGlowChanged()
void LLPanelSettingsSkySunMoonTab::onStarBrightnessChanged()
{
if (!mSkySettings) return;
- mSkySettings->setStarBrightness(getChild<LLUICtrl>(FIELD_SKY_STAR_BRIGHTNESS)->getValue().asReal());
+ mSkySettings->setStarBrightness((F32)getChild<LLUICtrl>(FIELD_SKY_STAR_BRIGHTNESS)->getValue().asReal());
mSkySettings->update();
setIsDirty();
}
@@ -663,8 +663,8 @@ void LLPanelSettingsSkySunMoonTab::onSunRotationChanged()
void LLPanelSettingsSkySunMoonTab::onSunAzimElevChanged()
{
- F32 azimuth = getChild<LLUICtrl>(FIELD_SKY_SUN_AZIMUTH)->getValue().asReal();
- F32 elevation = getChild<LLUICtrl>(FIELD_SKY_SUN_ELEVATION)->getValue().asReal();
+ F32 azimuth = (F32)getChild<LLUICtrl>(FIELD_SKY_SUN_AZIMUTH)->getValue().asReal();
+ F32 elevation = (F32)getChild<LLUICtrl>(FIELD_SKY_SUN_ELEVATION)->getValue().asReal();
LLQuaternion quat;
azimuth *= DEG_TO_RAD;
@@ -693,7 +693,7 @@ void LLPanelSettingsSkySunMoonTab::onSunAzimElevChanged()
void LLPanelSettingsSkySunMoonTab::onSunScaleChanged()
{
if (!mSkySettings) return;
- mSkySettings->setSunScale((getChild<LLUICtrl>(FIELD_SKY_SUN_SCALE)->getValue().asReal()));
+ mSkySettings->setSunScale((F32)(getChild<LLUICtrl>(FIELD_SKY_SUN_SCALE)->getValue().asReal()));
mSkySettings->update();
setIsDirty();
}
@@ -725,8 +725,8 @@ void LLPanelSettingsSkySunMoonTab::onMoonRotationChanged()
void LLPanelSettingsSkySunMoonTab::onMoonAzimElevChanged()
{
- F32 azimuth = getChild<LLUICtrl>(FIELD_SKY_MOON_AZIMUTH)->getValue().asReal();
- F32 elevation = getChild<LLUICtrl>(FIELD_SKY_MOON_ELEVATION)->getValue().asReal();
+ F32 azimuth = (F32)getChild<LLUICtrl>(FIELD_SKY_MOON_AZIMUTH)->getValue().asReal();
+ F32 elevation = (F32)getChild<LLUICtrl>(FIELD_SKY_MOON_ELEVATION)->getValue().asReal();
LLQuaternion quat;
azimuth *= DEG_TO_RAD;
@@ -763,7 +763,7 @@ void LLPanelSettingsSkySunMoonTab::onMoonImageChanged()
void LLPanelSettingsSkySunMoonTab::onMoonScaleChanged()
{
if (!mSkySettings) return;
- mSkySettings->setMoonScale((getChild<LLUICtrl>(FIELD_SKY_MOON_SCALE)->getValue().asReal()));
+ mSkySettings->setMoonScale((F32)(getChild<LLUICtrl>(FIELD_SKY_MOON_SCALE)->getValue().asReal()));
mSkySettings->update();
setIsDirty();
}
@@ -771,7 +771,7 @@ void LLPanelSettingsSkySunMoonTab::onMoonScaleChanged()
void LLPanelSettingsSkySunMoonTab::onMoonBrightnessChanged()
{
if (!mSkySettings) return;
- mSkySettings->setMoonBrightness((getChild<LLUICtrl>(FIELD_SKY_MOON_BRIGHTNESS)->getValue().asReal()));
+ mSkySettings->setMoonBrightness((F32)(getChild<LLUICtrl>(FIELD_SKY_MOON_BRIGHTNESS)->getValue().asReal()));
mSkySettings->update();
setIsDirty();
}
@@ -851,24 +851,24 @@ void LLPanelSettingsSkyDensityTab::refresh()
LLSD mie_config = mSkySettings->getMieConfig();
LLSD absorption_config = mSkySettings->getAbsorptionConfig();
- F32 rayleigh_exponential_term = rayleigh_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM].asReal();
- F32 rayleigh_exponential_scale = rayleigh_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR].asReal();
- F32 rayleigh_linear_term = rayleigh_config[LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM].asReal();
- F32 rayleigh_constant_term = rayleigh_config[LLSettingsSky::SETTING_DENSITY_PROFILE_CONSTANT_TERM].asReal();
- F32 rayleigh_max_alt = rayleigh_config[LLSettingsSky::SETTING_DENSITY_PROFILE_WIDTH].asReal();
-
- F32 mie_exponential_term = mie_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM].asReal();
- F32 mie_exponential_scale = mie_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR].asReal();
- F32 mie_linear_term = mie_config[LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM].asReal();
- F32 mie_constant_term = mie_config[LLSettingsSky::SETTING_DENSITY_PROFILE_CONSTANT_TERM].asReal();
- F32 mie_aniso_factor = mie_config[LLSettingsSky::SETTING_MIE_ANISOTROPY_FACTOR].asReal();
- F32 mie_max_alt = mie_config[LLSettingsSky::SETTING_DENSITY_PROFILE_WIDTH].asReal();
-
- F32 absorption_exponential_term = absorption_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM].asReal();
- F32 absorption_exponential_scale = absorption_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR].asReal();
- F32 absorption_linear_term = absorption_config[LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM].asReal();
- F32 absorption_constant_term = absorption_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM].asReal();
- F32 absorption_max_alt = absorption_config[LLSettingsSky::SETTING_DENSITY_PROFILE_WIDTH].asReal();
+ F32 rayleigh_exponential_term = (F32)rayleigh_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM].asReal();
+ F32 rayleigh_exponential_scale = (F32)rayleigh_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR].asReal();
+ F32 rayleigh_linear_term = (F32)rayleigh_config[LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM].asReal();
+ F32 rayleigh_constant_term = (F32)rayleigh_config[LLSettingsSky::SETTING_DENSITY_PROFILE_CONSTANT_TERM].asReal();
+ F32 rayleigh_max_alt = (F32)rayleigh_config[LLSettingsSky::SETTING_DENSITY_PROFILE_WIDTH].asReal();
+
+ F32 mie_exponential_term = (F32)mie_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM].asReal();
+ F32 mie_exponential_scale = (F32)mie_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR].asReal();
+ F32 mie_linear_term = (F32)mie_config[LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM].asReal();
+ F32 mie_constant_term = (F32)mie_config[LLSettingsSky::SETTING_DENSITY_PROFILE_CONSTANT_TERM].asReal();
+ F32 mie_aniso_factor = (F32)mie_config[LLSettingsSky::SETTING_MIE_ANISOTROPY_FACTOR].asReal();
+ F32 mie_max_alt = (F32)mie_config[LLSettingsSky::SETTING_DENSITY_PROFILE_WIDTH].asReal();
+
+ F32 absorption_exponential_term = (F32)absorption_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM].asReal();
+ F32 absorption_exponential_scale = (F32)absorption_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR].asReal();
+ F32 absorption_linear_term = (F32)absorption_config[LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM].asReal();
+ F32 absorption_constant_term = (F32)absorption_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM].asReal();
+ F32 absorption_max_alt = (F32)absorption_config[LLSettingsSky::SETTING_DENSITY_PROFILE_WIDTH].asReal();
getChild<LLUICtrl>(FIELD_SKY_DENSITY_RAYLEIGH_EXPONENTIAL)->setValue(rayleigh_exponential_term);
getChild<LLUICtrl>(FIELD_SKY_DENSITY_RAYLEIGH_EXPONENTIAL_SCALE)->setValue(rayleigh_exponential_scale);