diff options
author | Graham Linden <graham@lindenlab.com> | 2018-06-29 20:18:23 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-06-29 20:18:23 +0100 |
commit | 6f5ea064c02a9fd473cad6ce7bc2bd4c9f791c99 (patch) | |
tree | fef59988c05a7d55a68ba9521cd49a933d1423cb /indra/llinventory | |
parent | d5c465b4ab263e568761f6197534f7ddcda8a5ee (diff) | |
parent | 79570e276108c59f3384d49318835fdce35ce213 (diff) |
Merge
Diffstat (limited to 'indra/llinventory')
-rw-r--r-- | indra/llinventory/llfoldertype.cpp | 2 | ||||
-rw-r--r-- | indra/llinventory/llsettingssky.cpp | 41 |
2 files changed, 23 insertions, 20 deletions
diff --git a/indra/llinventory/llfoldertype.cpp b/indra/llinventory/llfoldertype.cpp index 067b22ee27..7241b3c0c2 100644 --- a/indra/llinventory/llfoldertype.cpp +++ b/indra/llinventory/llfoldertype.cpp @@ -100,7 +100,7 @@ LLFolderDictionary::LLFolderDictionary() addEntry(LLFolderType::FT_MARKETPLACE_STOCK, new FolderEntry("stock", FALSE)); addEntry(LLFolderType::FT_MARKETPLACE_VERSION, new FolderEntry("version", FALSE)); - addEntry(LLFolderType::FT_SETTINGS, new FolderEntry("settings", FALSE)); + addEntry(LLFolderType::FT_SETTINGS, new FolderEntry("settings", TRUE)); addEntry(LLFolderType::FT_NONE, new FolderEntry("-1", FALSE)); }; diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index 375bd7cbce..6e583f65d8 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -36,28 +36,32 @@ static const F32 NIGHTTIME_ELEVATION = -8.0f; // degrees static const F32 NIGHTTIME_ELEVATION_SIN = (F32)sinf(NIGHTTIME_ELEVATION * DEG_TO_RAD); -static LLQuaternion convert_azimuth_and_altitude_to_quat(F32 azimuth, F32 altitude) -{ - F32 sinTheta = sin(azimuth); - F32 cosTheta = cos(azimuth); - F32 sinPhi = sin(altitude); - F32 cosPhi = cos(altitude); +namespace { + LLQuaternion convert_azimuth_and_altitude_to_quat(F32 azimuth, F32 altitude) + { + F32 sinTheta = sin(azimuth); + F32 cosTheta = cos(azimuth); + F32 sinPhi = sin(altitude); + F32 cosPhi = cos(altitude); - LLVector3 dir; - // +x right, +z up, +y at... - dir.mV[0] = cosTheta * cosPhi; - dir.mV[1] = sinTheta * cosPhi; - dir.mV[2] = sinPhi; + LLVector3 dir; + // +x right, +z up, +y at... + dir.mV[0] = cosTheta * cosPhi; + dir.mV[1] = sinTheta * cosPhi; + dir.mV[2] = sinPhi; - LLVector3 axis = LLVector3::x_axis % dir; - axis.normalize(); + LLVector3 axis = LLVector3::x_axis % dir; + axis.normalize(); + if (mirror_axis) + axis *= -1; - F32 angle = acos(LLVector3::x_axis * dir); + F32 angle = acos(LLVector3::x_axis * dir); - LLQuaternion quat; - quat.setAngleAxis(angle, axis); + LLQuaternion quat; + quat.setAngleAxis(angle, axis); - return quat; + return quat; + } } static LLTrace::BlockTimerStatHandle FTM_BLEND_SKYVALUES("Blending Sky Environment"); @@ -794,11 +798,10 @@ LLSD LLSettingsSky::translateLegacySettings(const LLSD& legacy) F32 altitude = legacy[SETTING_LEGACY_SUN_ANGLE].asReal(); LLQuaternion sunquat = convert_azimuth_and_altitude_to_quat(azimuth, altitude); - // original WL moon dir was diametrically opposed to the sun dir LLQuaternion moonquat = convert_azimuth_and_altitude_to_quat(azimuth + F_PI, -altitude); - newsettings[SETTING_SUN_ROTATION] = sunquat.getValue(); + newsettings[SETTING_SUN_ROTATION] = sunquat.getValue(); newsettings[SETTING_MOON_ROTATION] = moonquat.getValue(); } |