diff options
Diffstat (limited to 'indra/llinventory')
-rw-r--r-- | indra/llinventory/llsettingssky.cpp | 17 | ||||
-rw-r--r-- | indra/llinventory/llsettingssky.h | 2 |
2 files changed, 19 insertions, 0 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index 37882b91ec..231077c217 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -980,6 +980,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 dc652dc182..4d0d4268b2 100644 --- a/indra/llinventory/llsettingssky.h +++ b/indra/llinventory/llsettingssky.h @@ -273,6 +273,8 @@ public: bool getIsMoonUp() const; LLVector3 getLightDirection() const; + LLColor3 getLightDiffuse() const; + LLVector3 getSunDirection() const; LLVector3 getMoonDirection() const; LLColor4U getFadeColor() const; |