aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lightshare.h
diff options
context:
space:
mode:
authorJacek Antonelli2010-07-27 04:08:19 -0500
committerJacek Antonelli2010-08-01 00:30:59 -0500
commite4475e45edde706332718908b1ebbef924c44b4f (patch)
tree496e051b768f1b1344b96418bba773f577c3b298 /linden/indra/newview/lightshare.h
parentFixed a Linden typo that made the object cache useless. (SNOW-783) (diff)
downloadmeta-impy-e4475e45edde706332718908b1ebbef924c44b4f.zip
meta-impy-e4475e45edde706332718908b1ebbef924c44b4f.tar.gz
meta-impy-e4475e45edde706332718908b1ebbef924c44b4f.tar.bz2
meta-impy-e4475e45edde706332718908b1ebbef924c44b4f.tar.xz
Refactored a bunch of messy LightShare code.
Diffstat (limited to 'linden/indra/newview/lightshare.h')
-rw-r--r--linden/indra/newview/lightshare.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/linden/indra/newview/lightshare.h b/linden/indra/newview/lightshare.h
new file mode 100644
index 0000000..a76cd1b
--- /dev/null
+++ b/linden/indra/newview/lightshare.h
@@ -0,0 +1,67 @@
1/**
2 * @file lightshare.h
3 * @brief Public interface for lightshare.cpp
4 *
5 * Copyright (c) 2010, Jacek Antonelli
6 *
7 * The source code in this file ("Source Code") is provided to you
8 * under the terms of the GNU General Public License, version 2.0
9 * ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in
10 * this distribution, or online at
11 * http://secondlifegrid.net/programs/open_source/licensing/gplv2
12 *
13 * There are special exceptions to the terms and conditions of the GPL as
14 * it is applied to this Source Code. View the full text of the exception
15 * in the file doc/FLOSS-exception.txt in this software distribution, or
16 * online at
17 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
18 *
19 * By copying, modifying or distributing this software, you acknowledge
20 * that you have read and understood your obligations described above,
21 * and agree to abide by those obligations.
22 *
23 * ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO
24 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
25 * COMPLETENESS OR PERFORMANCE.
26 */
27
28
29#ifndef LIGHTSHARE_H
30#define LIGHTSHARE_H
31
32#include "message.h"
33#include "meta7windlight.h"
34#include "llwaterparamset.h"
35#include "llwlparamset.h"
36
37
38// Encapsulates a "Windlight" (LightShare) message sent from the
39// server, allowing the settings to be applied at a later time.
40//
41class WindlightMessage
42{
43 public:
44
45 static const std::string sWaterPresetName;
46 static const std::string sSkyPresetName;
47
48 WindlightMessage( LLMessageSystem* msg );
49 ~WindlightMessage();
50 static void processWindlight(LLMessageSystem* msg, void**);
51 bool apply();
52 bool isValid();
53
54 private:
55
56 Meta7WindlightPacket* mPacket;
57 LLWaterParamSet* mWater;
58 LLWLParamSet* mSky;
59 LLUUID mWaterNormal;
60 bool mIsValid;
61
62 void process_packet( char* buf );
63 void process_water();
64 void process_sky();
65};
66
67#endif