summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llinventory')
-rw-r--r--indra/llinventory/llsettingssky.cpp17
-rw-r--r--indra/llinventory/llsettingssky.h2
2 files changed, 19 insertions, 0 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index ace530ae54..bd40760193 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -968,6 +968,23 @@ LLVector3 LLSettingsSky::getLightDirection() const
return LLVector3::z_axis;
}
+LLColor3 LLSettingsSky::getLightDiffuse() const
+{
+ update();
+
+ // is the normal from the sun or the moon
+ if (getIsSunUp())
+ {
+ return getSunDiffuse();
+ }
+ else if (getIsMoonUp())
+ {
+ return getMoonDiffuse();
+ }
+
+ return LLColor3::white;
+}
+
LLColor3 LLSettingsSky::getAmbientColor() const
{
// Todo: this causes complications, preferably to get rid of this duality
diff --git a/indra/llinventory/llsettingssky.h b/indra/llinventory/llsettingssky.h
index 796120ba03..bac8b52e65 100644
--- a/indra/llinventory/llsettingssky.h
+++ b/indra/llinventory/llsettingssky.h
@@ -272,6 +272,8 @@ public:
bool getIsMoonUp() const;
LLVector3 getLightDirection() const;
+ LLColor3 getLightDiffuse() const;
+
LLVector3 getSunDirection() const;
LLVector3 getMoonDirection() const;
LLColor4U getFadeColor() const;