diff options
Diffstat (limited to 'indra/newview/llwldaycycle.h')
-rw-r--r-- | indra/newview/llwldaycycle.h | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/indra/newview/llwldaycycle.h b/indra/newview/llwldaycycle.h index 5cbf72191d..988003c1af 100644 --- a/indra/newview/llwldaycycle.h +++ b/indra/newview/llwldaycycle.h @@ -34,13 +34,16 @@ class LLWLDayCycle; #include <string> #include "llwlparamset.h" #include "llwlanimator.h" +struct LLWLParamKey; +#include "llenvmanager.h" // for LLEnvKey::EScope class LLWLDayCycle { + LOG_CLASS(LLWLDayCycle); public: // lists what param sets are used when during the day - std::map<F32, std::string> mTimeMap; + std::map<F32, LLWLParamKey> mTimeMap; // how long is my day F32 mDayRate; @@ -54,35 +57,44 @@ public: ~LLWLDayCycle(); /// load a day cycle - void loadDayCycle(const std::string & fileName); + void loadDayCycle(const LLSD& llsd, LLEnvKey::EScope scope); + + /// load a day cycle + void loadDayCycleFromFile(const std::string & fileName); /// load a day cycle void saveDayCycle(const std::string & fileName); - /// clear keys - void clearKeys(); + /// load the LLSD data from a file (returns the undefined LLSD if not found) + static LLSD loadCycleDataFromFile(const std::string & fileName); + + /// get the LLSD data for this day cycle + LLSD asLLSD(); + + /// clear keyframes + void clearKeyframes(); /// Getters and Setters /// add a new key frame to the day cycle /// returns true if successful /// no negative time - bool addKey(F32 newTime, const std::string & paramName); + bool addKeyframe(F32 newTime, LLWLParamKey key); - /// adjust a key's placement in the day cycle + /// adjust a keyframe's placement in the day cycle /// returns true if successful - bool changeKeyTime(F32 oldTime, F32 newTime); + bool changeKeyframeTime(F32 oldTime, F32 newTime); - /// adjust a key's parameter used + /// adjust a keyframe's parameter used /// returns true if successful - bool changeKeyParam(F32 time, const std::string & paramName); + bool changeKeyframeParam(F32 time, LLWLParamKey key); - /// remove a key from the day cycle + /// remove a key frame from the day cycle /// returns true if successful - bool removeKey(F32 time); + bool removeKeyframe(F32 time); /// get the first key time for a parameter /// returns false if not there - bool getKey(const std::string & name, F32& key); + bool getKeytime(LLWLParamKey keyFrame, F32& keyTime); /// get the param set at a given time /// returns true if found one @@ -92,6 +104,9 @@ public: /// returns true if it found one bool getKeyedParamName(F32 time, std::string & name); + /// removes all references to the sky (paramkey) + /// does nothing if the sky doesn't exist in the day + void removeReferencesTo(const LLWLParamKey& keyframe); }; |