summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llinventory')
-rw-r--r--indra/llinventory/llsettingsbase.cpp4
-rw-r--r--indra/llinventory/llsettingsdaycycle.cpp4
-rw-r--r--indra/llinventory/llsettingssky.cpp282
-rw-r--r--indra/llinventory/llsettingssky.h331
4 files changed, 355 insertions, 266 deletions
diff --git a/indra/llinventory/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp
index f28d90cb62..24e808c92a 100644
--- a/indra/llinventory/llsettingsbase.cpp
+++ b/indra/llinventory/llsettingsbase.cpp
@@ -207,7 +207,9 @@ LLSD LLSettingsBase::interpolateSDMap(const LLSD &settings, const LLSD &other, F
if (slerps.find(key_name) != slerps.end())
{
- LLQuaternion q = slerp(mix, LLQuaternion(value), LLQuaternion(other_value));
+ LLQuaternion a(value);
+ LLQuaternion b(other_value);
+ LLQuaternion q = slerp(mix, a, b);
newvalue = q.getValue();
}
else
diff --git a/indra/llinventory/llsettingsdaycycle.cpp b/indra/llinventory/llsettingsdaycycle.cpp
index 87233e18c3..009d7b06f2 100644
--- a/indra/llinventory/llsettingsdaycycle.cpp
+++ b/indra/llinventory/llsettingsdaycycle.cpp
@@ -105,8 +105,8 @@ const std::string LLSettingsDay::SETTING_KEYHASH("key_hash");
const std::string LLSettingsDay::SETTING_TRACKS("tracks");
const std::string LLSettingsDay::SETTING_FRAMES("frames");
-const LLSettingsDay::Seconds LLSettingsDay::MINIMUM_DAYLENGTH(300); // 5 mins
-const LLSettingsDay::Seconds LLSettingsDay::DEFAULT_DAYLENGTH(14400); // 4 hours
+const LLSettingsDay::Seconds LLSettingsDay::MINIMUM_DAYLENGTH(120); // 2 mins
+const LLSettingsDay::Seconds LLSettingsDay::DEFAULT_DAYLENGTH(14400); // 4 hours
const LLSettingsDay::Seconds LLSettingsDay::MAXIMUM_DAYLENGTH(604800); // 7 days
const LLSettingsDay::Seconds LLSettingsDay::MINIMUM_DAYOFFSET(0);
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index 87581e813b..db574f2eec 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -388,6 +388,9 @@ void LLSettingsSky::blend(const LLSettingsBase::ptr_t &end, F64 blendf)
LLSD blenddata = interpolateSDMap(mSettings, other->mSettings, blendf);
replaceSettings(blenddata);
+ mPositionsDirty = true;
+ mLightingDirty = true;
+
setBlendFactor(blendf);
mNextSunTextureId = other->getSunTextureId();
mNextMoonTextureId = other->getMoonTextureId();
@@ -603,7 +606,7 @@ LLSD LLSettingsSky::defaults()
dfltsetting[SETTING_SUN_ROTATION] = sunquat.getValue();
dfltsetting[SETTING_BLOOM_TEXTUREID] = IMG_BLOOM1;
- dfltsetting[SETTING_CLOUD_TEXTUREID] = DEFAULT_CLOUD_ID;
+ dfltsetting[SETTING_CLOUD_TEXTUREID] = GetDefaultCloudNoiseTextureId();
dfltsetting[SETTING_MOON_TEXTUREID] = GetDefaultMoonTextureId();
dfltsetting[SETTING_SUN_TEXTUREID] = GetDefaultSunTextureId();
@@ -779,6 +782,9 @@ void LLSettingsSky::updateSettings()
// base class clears dirty flag so as to not trigger recursive update
LLSettingsBase::updateSettings();
+ // NOTE: these functions are designed to do nothing unless a dirty bit has been set
+ // so if you add new settings that are referenced by these update functions,
+ // you'll need to insure that your setter updates the dirty bits as well
calculateHeavenlyBodyPositions();
calculateLightSettings();
}
@@ -797,10 +803,11 @@ bool LLSettingsSky::getIsMoonUp() const
void LLSettingsSky::calculateHeavenlyBodyPositions() const
{
+ /* can't do this as it gets defeated during animation of env panel settings
if (!mPositionsDirty)
{
return;
- }
+ }*/
mPositionsDirty = false;
mLightingDirty = true; // changes light direction
@@ -1022,12 +1029,13 @@ LLColor4 LLSettingsSky::getTotalAmbient() const
void LLSettingsSky::calculateLightSettings() const
{
+ /* can't do this as it gets defeated during animation of env panel settings
if (!mLightingDirty)
{
return;
}
- calculateHeavenlyBodyPositions();
+ calculateHeavenlyBodyPositions();*/
mLightingDirty = false;
@@ -1082,3 +1090,271 @@ LLUUID LLSettingsSky::GetDefaultMoonTextureId()
{
return DEFAULT_MOON_ID;
}
+
+LLUUID LLSettingsSky::GetDefaultCloudNoiseTextureId()
+{
+ return DEFAULT_CLOUD_ID;
+}
+
+F32 LLSettingsSky::getPlanetRadius() const
+{
+ return mSettings[SETTING_PLANET_RADIUS].asReal();
+}
+
+F32 LLSettingsSky::getSkyBottomRadius() const
+{
+ return mSettings[SETTING_SKY_BOTTOM_RADIUS].asReal();
+}
+
+F32 LLSettingsSky::getSkyTopRadius() const
+{
+ return mSettings[SETTING_SKY_TOP_RADIUS].asReal();
+}
+
+F32 LLSettingsSky::getSunArcRadians() const
+{
+ return mSettings[SETTING_SUN_ARC_RADIANS].asReal();
+}
+
+F32 LLSettingsSky::getMieAnisotropy() const
+{
+ return mSettings[SETTING_MIE_ANISOTROPY_FACTOR].asReal();
+}
+
+LLSD LLSettingsSky::getRayleighConfigs() const
+{
+ return mSettings[SETTING_RAYLEIGH_CONFIG];
+}
+
+LLSD LLSettingsSky::getMieConfigs() const
+{
+ return mSettings[SETTING_MIE_CONFIG];
+}
+
+LLSD LLSettingsSky::getAbsorptionConfigs() const
+{
+ return mSettings[SETTING_ABSORPTION_CONFIG];
+}
+
+LLUUID LLSettingsSky::getBloomTextureId() const
+{
+ return mSettings[SETTING_BLOOM_TEXTUREID].asUUID();
+}
+
+//---------------------------------------------------------------------
+LLColor3 LLSettingsSky::getAmbientColor() const
+{
+ return LLColor3(mSettings[SETTING_AMBIENT]);
+}
+
+void LLSettingsSky::setAmbientColor(const LLColor3 &val)
+{
+ setValue(SETTING_AMBIENT, val);
+ mLightingDirty = true;
+}
+
+LLColor3 LLSettingsSky::getCloudColor() const
+{
+ return LLColor3(mSettings[SETTING_CLOUD_COLOR]);
+}
+
+void LLSettingsSky::setCloudColor(const LLColor3 &val)
+{
+ setValue(SETTING_CLOUD_COLOR, val);
+}
+
+LLUUID LLSettingsSky::getCloudNoiseTextureId() const
+{
+ return mSettings[SETTING_CLOUD_TEXTUREID].asUUID();
+}
+
+void LLSettingsSky::setCloudNoiseTextureId(const LLUUID &id)
+{
+ setValue(SETTING_CLOUD_TEXTUREID, id);
+}
+
+LLColor3 LLSettingsSky::getCloudPosDensity1() const
+{
+ return LLColor3(mSettings[SETTING_CLOUD_POS_DENSITY1]);
+}
+
+void LLSettingsSky::setCloudPosDensity1(const LLColor3 &val)
+{
+ setValue(SETTING_CLOUD_POS_DENSITY1, val);
+}
+
+LLColor3 LLSettingsSky::getCloudPosDensity2() const
+{
+ return LLColor3(mSettings[SETTING_CLOUD_POS_DENSITY2]);
+}
+
+void LLSettingsSky::setCloudPosDensity2(const LLColor3 &val)
+{
+ setValue(SETTING_CLOUD_POS_DENSITY2, val);
+}
+
+F32 LLSettingsSky::getCloudScale() const
+{
+ return mSettings[SETTING_CLOUD_SCALE].asReal();
+}
+
+void LLSettingsSky::setCloudScale(F32 val)
+{
+ setValue(SETTING_CLOUD_SCALE, val);
+}
+
+LLVector2 LLSettingsSky::getCloudScrollRate() const
+{
+ return LLVector2(mSettings[SETTING_CLOUD_SCROLL_RATE]);
+}
+
+void LLSettingsSky::setCloudScrollRate(const LLVector2 &val)
+{
+ setValue(SETTING_CLOUD_SCROLL_RATE, val);
+}
+
+void LLSettingsSky::setCloudScrollRateX(F32 val)
+{
+ mSettings[SETTING_CLOUD_SCROLL_RATE][0] = val;
+ setDirtyFlag(true);
+}
+
+void LLSettingsSky::setCloudScrollRateY(F32 val)
+{
+ mSettings[SETTING_CLOUD_SCROLL_RATE][1] = val;
+ setDirtyFlag(true);
+}
+
+F32 LLSettingsSky::getCloudShadow() const
+{
+ return mSettings[SETTING_CLOUD_SHADOW].asReal();
+}
+
+void LLSettingsSky::setCloudShadow(F32 val)
+{
+ setValue(SETTING_CLOUD_SHADOW, val);
+ mLightingDirty = true;
+}
+
+F32 LLSettingsSky::getDomeOffset() const
+{
+ //return mSettings[SETTING_DOME_OFFSET].asReal();
+ return DOME_OFFSET;
+}
+
+F32 LLSettingsSky::getDomeRadius() const
+{
+ //return mSettings[SETTING_DOME_RADIUS].asReal();
+ return DOME_RADIUS;
+}
+
+F32 LLSettingsSky::getGamma() const
+{
+ return mSettings[SETTING_GAMMA].asReal();
+}
+
+void LLSettingsSky::setGamma(F32 val)
+{
+ mSettings[SETTING_GAMMA] = LLSD::Real(val);
+ setDirtyFlag(true);
+ mLightingDirty = true;
+}
+
+LLColor3 LLSettingsSky::getGlow() const
+{
+ return LLColor3(mSettings[SETTING_GLOW]);
+}
+
+void LLSettingsSky::setGlow(const LLColor3 &val)
+{
+ setValue(SETTING_GLOW, val);
+ mLightingDirty = true;
+}
+
+F32 LLSettingsSky::getMaxY() const
+{
+ return mSettings[SETTING_MAX_Y].asReal();
+}
+
+void LLSettingsSky::setMaxY(F32 val)
+{
+ setValue(SETTING_MAX_Y, val);
+}
+
+LLQuaternion LLSettingsSky::getMoonRotation() const
+{
+ return LLQuaternion(mSettings[SETTING_MOON_ROTATION]);
+}
+
+void LLSettingsSky::setMoonRotation(const LLQuaternion &val)
+{
+ setValue(SETTING_MOON_ROTATION, val);
+ mPositionsDirty = true;
+}
+
+LLUUID LLSettingsSky::getMoonTextureId() const
+{
+ return mSettings[SETTING_MOON_TEXTUREID].asUUID();
+}
+
+void LLSettingsSky::setMoonTextureId(LLUUID id)
+{
+ setValue(SETTING_MOON_TEXTUREID, id);
+}
+
+F32 LLSettingsSky::getStarBrightness() const
+{
+ return mSettings[SETTING_STAR_BRIGHTNESS].asReal();
+}
+
+void LLSettingsSky::setStarBrightness(F32 val)
+{
+ setValue(SETTING_STAR_BRIGHTNESS, val);
+}
+
+LLColor3 LLSettingsSky::getSunlightColor() const
+{
+ return LLColor3(mSettings[SETTING_SUNLIGHT_COLOR]);
+}
+
+void LLSettingsSky::setSunlightColor(const LLColor3 &val)
+{
+ setValue(SETTING_SUNLIGHT_COLOR, val);
+ mLightingDirty = true;
+}
+
+LLQuaternion LLSettingsSky::getSunRotation() const
+{
+ return LLQuaternion(mSettings[SETTING_SUN_ROTATION]);
+}
+
+void LLSettingsSky::setSunRotation(const LLQuaternion &val)
+{
+ setValue(SETTING_SUN_ROTATION, val);
+ mPositionsDirty = true;
+}
+
+LLUUID LLSettingsSky::getSunTextureId() const
+{
+ return mSettings[SETTING_SUN_TEXTUREID].asUUID();
+}
+
+void LLSettingsSky::setSunTextureId(LLUUID id)
+{
+ setValue(SETTING_SUN_TEXTUREID, id);
+}
+
+LLUUID LLSettingsSky::getNextSunTextureId() const
+{
+ return mNextSunTextureId;
+}
+
+LLUUID LLSettingsSky::getNextMoonTextureId() const
+{
+ return mNextMoonTextureId;
+}
+
+LLUUID LLSettingsSky::getNextCloudNoiseTextureId() const
+{
+ return mNextCloudTextureId;
+}
diff --git a/indra/llinventory/llsettingssky.h b/indra/llinventory/llsettingssky.h
index a206106945..a557080744 100644
--- a/indra/llinventory/llsettingssky.h
+++ b/indra/llinventory/llsettingssky.h
@@ -105,274 +105,85 @@ public:
static LLSD defaults();
- F32 getPlanetRadius() const
- {
- return mSettings[SETTING_PLANET_RADIUS].asReal();
- }
-
- F32 getSkyBottomRadius() const
- {
- return mSettings[SETTING_SKY_BOTTOM_RADIUS].asReal();
- }
-
- F32 getSkyTopRadius() const
- {
- return mSettings[SETTING_SKY_TOP_RADIUS].asReal();
- }
-
- F32 getSunArcRadians() const
- {
- return mSettings[SETTING_SUN_ARC_RADIANS].asReal();
- }
-
- F32 getMieAnisotropy() const
- {
- return mSettings[SETTING_MIE_ANISOTROPY_FACTOR].asReal();
- }
-
- LLSD getRayleighConfigs() const
- {
- return mSettings[SETTING_RAYLEIGH_CONFIG];
- }
-
- LLSD getMieConfigs() const
- {
- return mSettings[SETTING_MIE_CONFIG];
- }
-
- LLSD getAbsorptionConfigs() const
- {
- return mSettings[SETTING_ABSORPTION_CONFIG];
- }
-
- LLUUID getBloomTextureId() const
- {
- return mSettings[SETTING_BLOOM_TEXTUREID].asUUID();
- }
+ F32 getPlanetRadius() const;
+ F32 getSkyBottomRadius() const;
+ F32 getSkyTopRadius() const;
+ F32 getSunArcRadians() const;
+ F32 getMieAnisotropy() const;
+ LLSD getRayleighConfigs() const;
+ LLSD getMieConfigs() const;
+
+ LLSD getAbsorptionConfigs() const;
+ LLUUID getBloomTextureId() const;
//---------------------------------------------------------------------
- LLColor3 getAmbientColor() const
- {
- return LLColor3(mSettings[SETTING_AMBIENT]);
- }
-
- void setAmbientColor(const LLColor3 &val)
- {
- setValue(SETTING_AMBIENT, val);
- mLightingDirty = true;
- }
-
- LLColor3 getCloudColor() const
- {
- return LLColor3(mSettings[SETTING_CLOUD_COLOR]);
- }
-
- void setCloudColor(const LLColor3 &val)
- {
- setValue(SETTING_CLOUD_COLOR, val);
- }
-
- LLUUID getCloudNoiseTextureId() const
- {
- return mSettings[SETTING_CLOUD_TEXTUREID].asUUID();
- }
-
- void setCloudNoiseTextureId(const LLUUID &id)
- {
- setValue(SETTING_CLOUD_TEXTUREID, id);
- }
-
- LLColor3 getCloudPosDensity1() const
- {
- return LLColor3(mSettings[SETTING_CLOUD_POS_DENSITY1]);
- }
-
- void setCloudPosDensity1(const LLColor3 &val)
- {
- setValue(SETTING_CLOUD_POS_DENSITY1, val);
- }
-
- LLColor3 getCloudPosDensity2() const
- {
- return LLColor3(mSettings[SETTING_CLOUD_POS_DENSITY2]);
- }
-
- void setCloudPosDensity2(const LLColor3 &val)
- {
- setValue(SETTING_CLOUD_POS_DENSITY2, val);
- }
-
- F32 getCloudScale() const
- {
- return mSettings[SETTING_CLOUD_SCALE].asReal();
- }
-
- void setCloudScale(F32 val)
- {
- setValue(SETTING_CLOUD_SCALE, val);
- }
-
- LLVector2 getCloudScrollRate() const
- {
- return LLVector2(mSettings[SETTING_CLOUD_SCROLL_RATE]);
- }
-
- void setCloudScrollRate(const LLVector2 &val)
- {
- setValue(SETTING_CLOUD_SCROLL_RATE, val);
- }
-
- void setCloudScrollRateX(F32 val)
- {
- mSettings[SETTING_CLOUD_SCROLL_RATE][0] = val;
- setDirtyFlag(true);
- }
-
- void setCloudScrollRateY(F32 val)
- {
- mSettings[SETTING_CLOUD_SCROLL_RATE][1] = val;
- setDirtyFlag(true);
- }
-
- F32 getCloudShadow() const
- {
- return mSettings[SETTING_CLOUD_SHADOW].asReal();
- }
-
- void setCloudShadow(F32 val)
- {
- setValue(SETTING_CLOUD_SHADOW, val);
- mLightingDirty = true;
- }
+ LLColor3 getAmbientColor() const;
+ void setAmbientColor(const LLColor3 &val);
+
+ LLColor3 getCloudColor() const;
+ void setCloudColor(const LLColor3 &val);
+
+ LLUUID getCloudNoiseTextureId() const;
+ void setCloudNoiseTextureId(const LLUUID &id);
+
+ LLColor3 getCloudPosDensity1() const;
+ void setCloudPosDensity1(const LLColor3 &val);
+
+ LLColor3 getCloudPosDensity2() const;
+ void setCloudPosDensity2(const LLColor3 &val);
+ F32 getCloudScale() const;
+ void setCloudScale(F32 val);
+
+ LLVector2 getCloudScrollRate() const;
+ void setCloudScrollRate(const LLVector2 &val);
+
+ void setCloudScrollRateX(F32 val);
+ void setCloudScrollRateY(F32 val);
+
+ F32 getCloudShadow() const;
+ void setCloudShadow(F32 val);
- F32 getDomeOffset() const
- {
- return DOME_OFFSET;
- //return mSettings[SETTING_DOME_OFFSET].asReal();
- }
-
- F32 getDomeRadius() const
- {
- return DOME_RADIUS;
- //return mSettings[SETTING_DOME_RADIUS].asReal();
- }
-
- F32 getGamma() const
- {
- return mSettings[SETTING_GAMMA].asReal();
- }
-
- void setGamma(F32 val)
- {
- mSettings[SETTING_GAMMA] = LLSD::Real(val);
- setDirtyFlag(true);
- mLightingDirty = true;
- }
-
- LLColor3 getGlow() const
- {
- return LLColor3(mSettings[SETTING_GLOW]);
- }
-
- void setGlow(const LLColor3 &val)
- {
- setValue(SETTING_GLOW, val);
- }
-
- F32 getMaxY() const
- {
- return mSettings[SETTING_MAX_Y].asReal();
- }
-
- void setMaxY(F32 val)
- {
- setValue(SETTING_MAX_Y, val);
- mLightingDirty = true;
- }
-
- LLQuaternion getMoonRotation() const
- {
- return LLQuaternion(mSettings[SETTING_MOON_ROTATION]);
- }
-
- void setMoonRotation(const LLQuaternion &val)
- {
- setValue(SETTING_MOON_ROTATION, val);
- mPositionsDirty = true;
- }
-
- LLUUID getMoonTextureId() const
- {
- return mSettings[SETTING_MOON_TEXTUREID].asUUID();
- }
-
- void setMoonTextureId(LLUUID id)
- {
- setValue(SETTING_MOON_TEXTUREID, id);
- }
-
- F32 getStarBrightness() const
- {
- return mSettings[SETTING_STAR_BRIGHTNESS].asReal();
- }
-
- void setStarBrightness(F32 val)
- {
- setValue(SETTING_STAR_BRIGHTNESS, val);
- }
-
- LLColor3 getSunlightColor() const
- {
- return LLColor3(mSettings[SETTING_SUNLIGHT_COLOR]);
- }
-
- void setSunlightColor(const LLColor3 &val)
- {
- setValue(SETTING_SUNLIGHT_COLOR, val);
- mLightingDirty = true;
- }
-
- LLQuaternion getSunRotation() const
- {
- return LLQuaternion(mSettings[SETTING_SUN_ROTATION]);
- }
-
- void setSunRotation(const LLQuaternion &val)
- {
- setValue(SETTING_SUN_ROTATION, val);
- mPositionsDirty = true;
- }
-
- LLUUID getSunTextureId() const
- {
- return mSettings[SETTING_SUN_TEXTUREID].asUUID();
- }
-
- void setSunTextureId(LLUUID id)
- {
- setValue(SETTING_SUN_TEXTUREID, id);
- }
+ F32 getDomeOffset() const;
+ F32 getDomeRadius() const;
- //=====================================================================
- // transient properties used in animations.
- LLUUID getNextSunTextureId() const
- {
- return mNextSunTextureId;
- }
+ F32 getGamma() const;
+
+ void setGamma(F32 val);
- LLUUID getNextMoonTextureId() const
- {
- return mNextMoonTextureId;
- }
+ LLColor3 getGlow() const;
+ void setGlow(const LLColor3 &val);
- LLUUID getNextCloudNoiseTextureId() const
- {
- return mNextCloudTextureId;
- }
+ F32 getMaxY() const;
+
+ void setMaxY(F32 val);
+
+ LLQuaternion getMoonRotation() const;
+ void setMoonRotation(const LLQuaternion &val);
+
+ LLUUID getMoonTextureId() const;
+ void setMoonTextureId(LLUUID id);
+
+ F32 getStarBrightness() const;
+ void setStarBrightness(F32 val);
+
+ LLColor3 getSunlightColor() const;
+ void setSunlightColor(const LLColor3 &val);
+
+ LLQuaternion getSunRotation() const;
+ void setSunRotation(const LLQuaternion &val) ;
+
+ LLUUID getSunTextureId() const;
+ void setSunTextureId(LLUUID id);
//=====================================================================
- virtual void loadTextures() { };
+ // transient properties used in animations.
+ LLUUID getNextSunTextureId() const;
+ LLUUID getNextMoonTextureId() const;
+ LLUUID getNextCloudNoiseTextureId() const;
+
+ //=====================================================================
+ virtual void loadTextures() { };
//=====================================================================
virtual validation_list_t getValidationList() const SETTINGS_OVERRIDE;
@@ -387,7 +198,6 @@ public:
LLColor3 getLightTransmittance() const;
LLColor3 gammaCorrect(const LLColor3& in) const;
-
LLColor3 getBlueDensity() const;
LLColor3 getBlueHorizon() const;
F32 getHazeDensity() const;
@@ -421,6 +231,7 @@ public:
static LLUUID GetDefaultAssetId();
static LLUUID GetDefaultSunTextureId();
static LLUUID GetDefaultMoonTextureId();
+ static LLUUID GetDefaultCloudNoiseTextureId();
protected:
static const std::string SETTING_LEGACY_EAST_ANGLE;