diff options
author | Rider Linden <rider@lindenlab.com> | 2018-05-24 13:11:33 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2018-05-24 13:11:33 -0700 |
commit | fa4ac065cb332c8c90fb59eeff0b983a1fd56691 (patch) | |
tree | 61bdaf3c09b2ff9041dd9d7ff23abcb127f85f5f /indra/llinventory/llsettingsbase.h | |
parent | fbaa01d9a0c63386f13f0e43437c69f700950fd6 (diff) |
Enable sky changes with altitude.
Diffstat (limited to 'indra/llinventory/llsettingsbase.h')
-rw-r--r-- | indra/llinventory/llsettingsbase.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/indra/llinventory/llsettingsbase.h b/indra/llinventory/llsettingsbase.h index d00e340b4b..71358d6a49 100644 --- a/indra/llinventory/llsettingsbase.h +++ b/indra/llinventory/llsettingsbase.h @@ -166,6 +166,8 @@ public: virtual bool validate(); + virtual ptr_t buildDerivedClone() = 0; + class Validator { public: @@ -269,10 +271,15 @@ public: mOnFinished(), mTarget(target), mInitial(initsetting), - mFinal(endsetting) + mFinal(endsetting), + mIsTrivial(false) { if (mInitial) mTarget->replaceSettings(mInitial->getSettings()); + + if (!mFinal) + mFinal = mInitial; + mIsTrivial = (mFinal == mInitial); } virtual ~LLSettingsBlender() {} @@ -280,8 +287,16 @@ public: virtual void reset( LLSettingsBase::ptr_t &initsetting, const LLSettingsBase::ptr_t &endsetting, F64 /*span*/ = 1.0) { // note: the 'span' reset parameter is unused by the base class. + if (!mInitial) + LL_WARNS("BLENDER") << "Reseting blender with empty initial setting. Expect badness in the future." << LL_ENDL; + mInitial = initsetting; mFinal = endsetting; + + if (!mFinal) + mFinal = mInitial; + mIsTrivial = (mFinal == mInitial); + mTarget->replaceSettings(mInitial->getSettings()); } @@ -308,6 +323,8 @@ public: virtual void update(F64 blendf); virtual F64 setPosition(F64 blendf); + virtual void switchTrack(S32 trackno, F64 position = -1.0) { /*NoOp*/ } + protected: void triggerComplete(); @@ -316,6 +333,7 @@ protected: LLSettingsBase::ptr_t mTarget; LLSettingsBase::ptr_t mInitial; LLSettingsBase::ptr_t mFinal; + bool mIsTrivial; }; class LLSettingsBlenderTimeDelta : public LLSettingsBlender @@ -349,6 +367,8 @@ public: virtual void update(F64 timedelta) override; protected: + F64 calculateBlend(F64 spanpos, F64 spanlen) const; + F64Seconds mBlendSpan; F64Seconds mLastUpdate; F64Seconds mTimeSpent; |