summaryrefslogtreecommitdiff
path: root/indra/newview/llenvironment.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llenvironment.h')
-rw-r--r--indra/newview/llenvironment.h37
1 files changed, 25 insertions, 12 deletions
diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h
index 27bb6e7fc2..0fbc49bc7d 100644
--- a/indra/newview/llenvironment.h
+++ b/indra/newview/llenvironment.h
@@ -54,6 +54,7 @@ public:
static const F32Seconds TRANSITION_FAST;
static const F32Seconds TRANSITION_DEFAULT;
static const F32Seconds TRANSITION_SLOW;
+ static const F32Seconds TRANSITION_ALTITUDE;
struct EnvironmentInfo
{
@@ -61,18 +62,18 @@ public:
typedef std::shared_ptr<EnvironmentInfo> ptr_t;
- S32 mParcelId;
- LLUUID mRegionId;
- S64Seconds mDayLength;
- S64Seconds mDayOffset;
- size_t mDayHash;
- LLSD mDaycycleData;
- LLSD mAltitudes;
- bool mIsDefault;
- bool mIsRegion;
+ S32 mParcelId;
+ LLUUID mRegionId;
+ S64Seconds mDayLength;
+ S64Seconds mDayOffset;
+ size_t mDayHash;
+ LLSD mDaycycleData;
+ std::array<F32, 4> mAltitudes;
+ bool mIsDefault;
+ bool mIsRegion;
- static ptr_t extract(LLSD);
+ static ptr_t extract(LLSD);
};
@@ -129,6 +130,8 @@ public:
typedef boost::signals2::signal<void()> change_signal_t;
typedef std::function<void(S32, EnvironmentInfo::ptr_t)> environment_apply_fn;
+ typedef std::array<F32, 4> altitude_list_t;
+
virtual ~LLEnvironment();
void loadPreferences();
@@ -204,7 +207,8 @@ public:
LLVector4 getRotatedLightNorm() const;
static LLSettingsWater::ptr_t createWaterFromLegacyPreset(const std::string filename);
- static LLSettingsSky::ptr_t createSkyFromLegacyPreset(const std::string filename);
+ static LLSettingsSky::ptr_t createSkyFromLegacyPreset(const std::string filename);
+ static LLSettingsDay::ptr_t createDayCycleFromLegacyPreset(const std::string filename);
//-------------------------------------------
connection_t setSkyListChange(const change_signal_t::slot_type& cb);
@@ -224,6 +228,10 @@ public:
void selectAgentEnvironment();
+ S32 calculateSkyTrackForAltitude(F64 altitude);
+
+ const altitude_list_t & getRegionAltitudes() const { return mTrackAltitudes; }
+
protected:
virtual void initSingleton();
@@ -280,6 +288,7 @@ private:
S64Seconds mDayLength;
S64Seconds mDayOffset;
+ S32 mLastTrackAltitude;
LLSettingsBlender::ptr_t mBlenderSky;
LLSettingsBlender::ptr_t mBlenderWater;
@@ -343,6 +352,9 @@ private:
change_signal_t mWaterListChange;
change_signal_t mDayCycleListChange;
+ S32 mCurrentTrack;
+ altitude_list_t mTrackAltitudes;
+
DayInstance::ptr_t getEnvironmentInstance(EnvSelection_t env, bool create = false);
DayInstance::ptr_t getSelectedEnvironmentInstance();
@@ -374,6 +386,7 @@ private:
void recordEnvironment(S32 parcel_id, EnvironmentInfo::ptr_t environment);
+ void onAgentPositionHasChanged(const LLVector3 &localpos);
//=========================================================================
void legacyLoadAllPresets();
static LLSD legacyLoadPreset(const std::string& path);
@@ -388,7 +401,7 @@ public:
LLTrackBlenderLoopingManual(const LLSettingsBase::ptr_t &target, const LLSettingsDay::ptr_t &day, S32 trackno);
F64 setPosition(F64 position) override;
- void switchTrack(S32 trackno, F64 position = -1.0);
+ virtual void switchTrack(S32 trackno, F64 position) override;
S32 getTrack() const { return mTrackNo; }
typedef std::shared_ptr<LLTrackBlenderLoopingManual> ptr_t;