diff options
author | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
commit | cd17687f01420952712a500107e0f93e7ab8d5f8 (patch) | |
tree | ce48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/newview/llwldaycycle.h | |
parent | Second Life viewer sources 1.19.0.5 (diff) | |
download | meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2 meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz |
Second Life viewer sources 1.19.1.0
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llwldaycycle.h | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/linden/indra/newview/llwldaycycle.h b/linden/indra/newview/llwldaycycle.h new file mode 100644 index 0000000..85e75c2 --- /dev/null +++ b/linden/indra/newview/llwldaycycle.h | |||
@@ -0,0 +1,105 @@ | |||
1 | /** | ||
2 | * @file llwlparammanager.h | ||
3 | * @brief Implementation for the LLWLParamManager class. | ||
4 | * | ||
5 | * $LicenseInfo:firstyear=2007&license=viewergpl$ | ||
6 | * | ||
7 | * Copyright (c) 2007-2008, Linden Research, Inc. | ||
8 | * | ||
9 | * Second Life Viewer Source Code | ||
10 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
11 | * to you under the terms of the GNU General Public License, version 2.0 | ||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
16 | * | ||
17 | * There are special exceptions to the terms and conditions of the GPL as | ||
18 | * it is applied to this Source Code. View the full text of the exception | ||
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | ||
22 | * By copying, modifying or distributing this software, you acknowledge | ||
23 | * that you have read and understood your obligations described above, | ||
24 | * and agree to abide by those obligations. | ||
25 | * | ||
26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
28 | * COMPLETENESS OR PERFORMANCE. | ||
29 | * $/LicenseInfo$ | ||
30 | */ | ||
31 | |||
32 | #ifndef LL_WL_DAY_CYCLE_H | ||
33 | #define LL_WL_DAY_CYCLE_H | ||
34 | |||
35 | class LLWLDayCycle; | ||
36 | |||
37 | #include "llfloater.h" | ||
38 | |||
39 | #include <vector> | ||
40 | #include <map> | ||
41 | #include <string> | ||
42 | #include "llwlparamset.h" | ||
43 | #include "llwlanimator.h" | ||
44 | |||
45 | class LLWLDayCycle | ||
46 | { | ||
47 | public: | ||
48 | |||
49 | // lists what param sets are used when during the day | ||
50 | std::map<F32, std::string> mTimeMap; | ||
51 | |||
52 | // how long is my day | ||
53 | F32 mDayRate; | ||
54 | |||
55 | public: | ||
56 | |||
57 | /// simple constructor | ||
58 | LLWLDayCycle(); | ||
59 | |||
60 | /// simple destructor | ||
61 | ~LLWLDayCycle(); | ||
62 | |||
63 | /// load a day cycle | ||
64 | void loadDayCycle(const LLString & fileName); | ||
65 | |||
66 | /// load a day cycle | ||
67 | void saveDayCycle(const LLString & fileName); | ||
68 | |||
69 | /// clear keys | ||
70 | void clearKeys(); | ||
71 | |||
72 | /// Getters and Setters | ||
73 | /// add a new key frame to the day cycle | ||
74 | /// returns true if successful | ||
75 | /// no negative time | ||
76 | bool addKey(F32 newTime, const LLString & paramName); | ||
77 | |||
78 | /// adjust a key's placement in the day cycle | ||
79 | /// returns true if successful | ||
80 | bool changeKeyTime(F32 oldTime, F32 newTime); | ||
81 | |||
82 | /// adjust a key's parameter used | ||
83 | /// returns true if successful | ||
84 | bool changeKeyParam(F32 time, const LLString & paramName); | ||
85 | |||
86 | /// remove a key from the day cycle | ||
87 | /// returns true if successful | ||
88 | bool removeKey(F32 time); | ||
89 | |||
90 | /// get the first key time for a parameter | ||
91 | /// returns false if not there | ||
92 | bool getKey(const LLString & name, F32& key); | ||
93 | |||
94 | /// get the param set at a given time | ||
95 | /// returns true if found one | ||
96 | bool getKeyedParam(F32 time, LLWLParamSet& param); | ||
97 | |||
98 | /// get the name | ||
99 | /// returns true if it found one | ||
100 | bool getKeyedParamName(F32 time, LLString & name); | ||
101 | |||
102 | }; | ||
103 | |||
104 | |||
105 | #endif | ||