diff options
Diffstat (limited to 'indra/llinventory/llsettingssky.h')
-rw-r--r-- | indra/llinventory/llsettingssky.h | 133 |
1 files changed, 86 insertions, 47 deletions
diff --git a/indra/llinventory/llsettingssky.h b/indra/llinventory/llsettingssky.h index 23daf0c5dc..5d7d3adbfe 100644 --- a/indra/llinventory/llsettingssky.h +++ b/indra/llinventory/llsettingssky.h @@ -31,6 +31,8 @@ #include "llsettingsbase.h" #include "v4coloru.h" +#define SUPPORT_LEGACY_ATMOSPHERICS 1 + class LLSettingsSky: public LLSettingsBase { public: @@ -38,6 +40,11 @@ public: static const std::string SETTING_BLOOM_TEXTUREID; static const std::string SETTING_BLUE_DENSITY; static const std::string SETTING_BLUE_HORIZON; + static const std::string SETTING_DENSITY_MULTIPLIER; + static const std::string SETTING_DISTANCE_MULTIPLIER; + static const std::string SETTING_HAZE_DENSITY; + static const std::string SETTING_HAZE_HORIZON; + static const std::string SETTING_BLOOM_TEXTUREID; static const std::string SETTING_CLOUD_COLOR; static const std::string SETTING_CLOUD_POS_DENSITY1; static const std::string SETTING_CLOUD_POS_DENSITY2; @@ -45,14 +52,10 @@ public: static const std::string SETTING_CLOUD_SCROLL_RATE; static const std::string SETTING_CLOUD_SHADOW; static const std::string SETTING_CLOUD_TEXTUREID; - static const std::string SETTING_DENSITY_MULTIPLIER; - static const std::string SETTING_DISTANCE_MULTIPLIER; static const std::string SETTING_DOME_OFFSET; static const std::string SETTING_DOME_RADIUS; static const std::string SETTING_GAMMA; - static const std::string SETTING_GLOW; - static const std::string SETTING_HAZE_DENSITY; - static const std::string SETTING_HAZE_HORIZON; + static const std::string SETTING_GLOW; static const std::string SETTING_LIGHT_NORMAL; static const std::string SETTING_MAX_Y; static const std::string SETTING_MOON_ROTATION; @@ -60,7 +63,24 @@ public: static const std::string SETTING_STAR_BRIGHTNESS; static const std::string SETTING_SUNLIGHT_COLOR; static const std::string SETTING_SUN_ROTATION; - static const std::string SETTING_SUN_TEXUTUREID; + static const std::string SETTING_SUN_TEXTUREID; + + static const std::string SETTING_PLANET_RADIUS; + static const std::string SETTING_SKY_BOTTOM_RADIUS; + static const std::string SETTING_SKY_TOP_RADIUS; + static const std::string SETTING_SUN_ARC_RADIANS; + + static const std::string SETTING_RAYLEIGH_CONFIG; + static const std::string SETTING_MIE_CONFIG; + static const std::string SETTING_ABSORPTION_CONFIG; + + static const std::string KEY_DENSITY_PROFILE; + static const std::string SETTING_DENSITY_PROFILE_WIDTH; + static const std::string SETTING_DENSITY_PROFILE_EXP_TERM; + static const std::string SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR; + static const std::string SETTING_DENSITY_PROFILE_LINEAR_TERM; + static const std::string SETTING_DENSITY_PROFILE_CONSTANT_TERM; + static const std::string SETTING_MIE_ANISOTROPY_FACTOR; typedef std::shared_ptr<LLSettingsSky> ptr_t; typedef std::pair<F32, F32> azimalt_t; @@ -81,7 +101,13 @@ public: static LLSD defaults(); + LLUUID getBloomTextureId() const + { + return mSettings[SETTING_BLOOM_TEXTUREID].asUUID(); + } + //--------------------------------------------------------------------- +#if SUPPORT_LEGACY_ATMOSPHERICS LLColor3 getAmbientColor() const { return LLColor3(mSettings[SETTING_AMBIENT]); @@ -117,6 +143,47 @@ public: setValue(SETTING_BLUE_HORIZON, val); } + F32 getDensityMultiplier() const + { + return mSettings[SETTING_DENSITY_MULTIPLIER].asReal(); + } + + void setDensityMultiplier(F32 val) + { + setValue(SETTING_DENSITY_MULTIPLIER, val); + } + + F32 getDistanceMultiplier() const + { + return mSettings[SETTING_DISTANCE_MULTIPLIER].asReal(); + } + + void setDistanceMultiplier(F32 val) + { + setValue(SETTING_DISTANCE_MULTIPLIER, val); + } + + F32 getHazeDensity() const + { + return mSettings[SETTING_HAZE_DENSITY].asReal(); + } + + void setHazeDensity(F32 val) + { + setValue(SETTING_HAZE_DENSITY, val); + } + + F32 getHazeHorizon() const + { + return mSettings[SETTING_HAZE_HORIZON].asReal(); + } + + void setHazeHorizon(F32 val) + { + setValue(SETTING_HAZE_HORIZON, val); + } +#endif + LLColor3 getCloudColor() const { return LLColor3(mSettings[SETTING_CLOUD_COLOR]); @@ -194,26 +261,7 @@ public: setValue(SETTING_CLOUD_SHADOW, val); } - F32 getDensityMultiplier() const - { - return mSettings[SETTING_DENSITY_MULTIPLIER].asReal(); - } - - void setDensityMultiplier(F32 val) - { - setValue(SETTING_DENSITY_MULTIPLIER, val); - } - - F32 getDistanceMultiplier() const - { - return mSettings[SETTING_DISTANCE_MULTIPLIER].asReal(); - } - - void setDistanceMultiplier(F32 val) - { - setValue(SETTING_DISTANCE_MULTIPLIER, val); - } - + F32 getDomeOffset() const { return DOME_OFFSET; @@ -247,26 +295,6 @@ public: setValue(SETTING_GLOW, val); } - F32 getHazeDensity() const - { - return mSettings[SETTING_HAZE_DENSITY].asReal(); - } - - void setHazeDensity(F32 val) - { - setValue(SETTING_HAZE_DENSITY, val); - } - - F32 getHazeHorizon() const - { - return mSettings[SETTING_HAZE_HORIZON].asReal(); - } - - void setHazeHorizon(F32 val) - { - setValue(SETTING_HAZE_HORIZON, val); - } - LLVector3 getLightNormal() const { return LLVector3(mSettings[SETTING_LIGHT_NORMAL]); @@ -347,7 +375,7 @@ public: LLUUID getSunTextureId() const { - return mSettings[SETTING_SUN_TEXUTUREID].asUUID(); + return mSettings[SETTING_SUN_TEXTUREID].asUUID(); } // Internal/calculated settings @@ -416,6 +444,8 @@ public: static LLSD translateLegacySettings(LLSD legacy); + static LLSD settingValidation(LLSD &settings, validation_list_t &validations); + protected: static const std::string SETTING_LEGACY_EAST_ANGLE; static const std::string SETTING_LEGACY_ENABLE_CLOUD_SCROLL; @@ -428,6 +458,15 @@ protected: virtual void updateSettings(); private: + // validations for structured sections of sky settings data + static validation_list_t rayleighValidationList(); + static validation_list_t absorptionValidationList(); + static validation_list_t mieValidationList(); + + static LLSD rayleighConfigDefault(); + static LLSD absorptionConfigDefault(); + static LLSD mieConfigDefault(); + static const F32 NIGHTTIME_ELEVATION; static const F32 NIGHTTIME_ELEVATION_COS; |