From 61e6632a713041e8e4ccebf72874767238bf8a48 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 3 Nov 2017 11:28:08 -0700 Subject: Initial day cycle impl. --- indra/newview/llsettingsdaycycle.h | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'indra/newview/llsettingsdaycycle.h') diff --git a/indra/newview/llsettingsdaycycle.h b/indra/newview/llsettingsdaycycle.h index 5eb704cdb7..f332b85dee 100644 --- a/indra/newview/llsettingsdaycycle.h +++ b/indra/newview/llsettingsdaycycle.h @@ -42,7 +42,7 @@ public: static const std::string SETTING_DAYLENGTH; static const std::string SETTING_KEYID; static const std::string SETTING_KEYNAME; - static const std::string SETTING_KEYOFFSET; + static const std::string SETTING_KEYKFRAME; static const std::string SETTING_NAME; static const std::string SETTING_TRACKS; @@ -56,7 +56,7 @@ public: typedef std::vector CycleList_t; typedef boost::shared_ptr ptr_t; typedef std::vector TimeList_t; - typedef std::vector OffsetList_t; + typedef std::vector KeyframeList_t; typedef std::pair TrackBound_t; //--------------------------------------------------------------------- @@ -71,7 +71,7 @@ public: virtual std::string getSettingType() const { return std::string("daycycle"); } // Settings status - virtual LLSettingsBase::ptr_t blend(const LLSettingsBase::ptr_t &other, F32 mix) const; + virtual void blend(const LLSettingsBase::ptr_t &other, F32 mix); static LLSD defaults(); @@ -83,11 +83,11 @@ public: void setDayLength(S32 seconds); - OffsetList_t getTrackOffsets(S32 track); + KeyframeList_t getTrackKeyframes(S32 track); TimeList_t getTrackTimes(S32 track); void setWaterAtTime(const LLSettingsWaterPtr_t &water, S32 seconds); - void setWaterAtOffset(const LLSettingsWaterPtr_t &water, F32 offset); + void setWaterAtKeyframe(const LLSettingsWaterPtr_t &water, F32 keyframe); LLSettingsSkyPtr_t getBlendedWaterAt(S32 seconds); void setSkyAtOnTrack(const LLSettingsSkyPtr_t &sky, S32 seconds, S32 track); @@ -98,23 +98,27 @@ protected: virtual void updateSettings(); + LLSettingsSkyPtr_t mBlendedSky; + LLSettingsWaterPtr_t mBlendedWater; CycleList_t mDayTracks; - F32 secondsToOffset(S32 seconds); - S32 offsetToSeconds(F32 offset); + bool mHasParsed; - LLSettingsBase::ptr_t getBlendedEntry(CycleTrack_t &track, F32 offset); + F32 secondsToKeyframe(S32 seconds); + S32 keyframeToSeconds(F32 keyframe); + + //LLSettingsBase::ptr_t getBlendedEntry(const CycleTrack_t &track, F32 keyframe); void parseFromLLSD(LLSD &data); // CycleList_t & getTrackRef(S32 trackno); - static CycleTrack_t::iterator getEntryAtOrBefore(CycleTrack_t &track, F32 offset); - static CycleTrack_t::iterator getEntryAtOrAfter(CycleTrack_t &track, F32 offset); - - static TrackBound_t getBoundingEntries(CycleTrack_t &track, F32 offset); + static CycleTrack_t::iterator getEntryAtOrBefore(CycleTrack_t &track, F32 keyframe); + static CycleTrack_t::iterator getEntryAtOrAfter(CycleTrack_t &track, F32 keyframe); + static TrackBound_t getBoundingEntries(CycleTrack_t &track, F32 keyframe); + F32Seconds mLastUpdateTime; private: }; -- cgit v1.2.3