diff options
Diffstat (limited to '')
-rwxr-xr-x[-rw-r--r--] | linden/indra/llmath/llsdutil_math.h (renamed from linden/indra/llmedia/llmediaimplexample2.h) | 76 |
1 files changed, 35 insertions, 41 deletions
diff --git a/linden/indra/llmedia/llmediaimplexample2.h b/linden/indra/llmath/llsdutil_math.h index 6a4f80b..5b64942 100644..100755 --- a/linden/indra/llmedia/llmediaimplexample2.h +++ b/linden/indra/llmath/llsdutil_math.h | |||
@@ -1,10 +1,12 @@ | |||
1 | /** | 1 | /** |
2 | * @file llmediaimplexample2.h | 2 | * @file llsdutil_math.h |
3 | * @brief Example 2 of a media impl concrete class | 3 | * @author Brad |
4 | * @date 2009-05-19 | ||
5 | * @brief Utility classes, functions, etc, for using structured data with math classes. | ||
4 | * | 6 | * |
5 | * $LicenseInfo:firstyear=2007&license=viewergpl$ | 7 | * $LicenseInfo:firstyear=2009&license=viewergpl$ |
6 | * | 8 | * |
7 | * Copyright (c) 2007-2009, Linden Research, Inc. | 9 | * Copyright (c) 2009-2010, Linden Research, Inc. |
8 | * | 10 | * |
9 | * Second Life Viewer Source Code | 11 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 12 | * The source code in this file ("Source Code") is provided by Linden Lab |
@@ -30,47 +32,39 @@ | |||
30 | * $/LicenseInfo$ | 32 | * $/LicenseInfo$ |
31 | */ | 33 | */ |
32 | 34 | ||
33 | #ifndef LLMEDIAIMPLEXAMPLE2_H | 35 | #ifndef LL_LLSDUTIL_MATH_H |
34 | #define LLMEDIAIMPLEXAMPLE2_H | 36 | #define LL_LLSDUTIL_MATH_H |
35 | 37 | ||
36 | #include "llmediaimplcommon.h" | 38 | class LL_COMMON_API LLSD; |
37 | #include "llmediaimplfactory.h" | ||
38 | 39 | ||
39 | class LLMediaManagerData; | 40 | // vector3 |
40 | class LLMediaImplMaker; | 41 | class LLVector3; |
42 | LLSD ll_sd_from_vector3(const LLVector3& vec); | ||
43 | LLVector3 ll_vector3_from_sd(const LLSD& sd, S32 start_index = 0); | ||
41 | 44 | ||
42 | class LLMediaImplExample2 : | 45 | // vector4 |
43 | public LLMediaImplCommon | 46 | class LLVector4; |
44 | { | 47 | LLSD ll_sd_from_vector4(const LLVector4& vec); |
45 | public: | 48 | LLVector4 ll_vector4_from_sd(const LLSD& sd, S32 start_index = 0); |
46 | LLMediaImplExample2(); | ||
47 | 49 | ||
48 | static bool startup( LLMediaManagerData* init_data ); | 50 | // vector3d (double) |
49 | static bool closedown(); | 51 | class LLVector3d; |
52 | LLSD ll_sd_from_vector3d(const LLVector3d& vec); | ||
53 | LLVector3d ll_vector3d_from_sd(const LLSD& sd, S32 start_index = 0); | ||
50 | 54 | ||
51 | /* virtual */ bool init(); | 55 | // vector2 |
52 | /* virtual */ bool navigateTo( const std::string url ); | 56 | class LLVector2; |
53 | /* virtual */ bool load( const std::string url ); | 57 | LLSD ll_sd_from_vector2(const LLVector2& vec); |
54 | /* virtual */ std::string getVersion(); | 58 | LLVector2 ll_vector2_from_sd(const LLSD& sd); |
55 | /* virtual */ bool updateMedia(); | ||
56 | /* virtual */ unsigned char* getMediaData(); | ||
57 | /* virtual */ bool reset(); | ||
58 | /* virtual */ bool setRequestedMediaSize( int width, int height ); | ||
59 | 59 | ||
60 | private: | 60 | // Quaternion |
61 | unsigned char* mMediaPixels; | 61 | class LLQuaternion; |
62 | int mXpos; | 62 | LLSD ll_sd_from_quaternion(const LLQuaternion& quat); |
63 | int mYpos; | 63 | LLQuaternion ll_quaternion_from_sd(const LLSD& sd); |
64 | }; | ||
65 | 64 | ||
66 | class LLMediaImplExample2Maker : public LLMediaImplMaker | 65 | // color4 |
67 | { | 66 | class LLColor4; |
68 | public: | 67 | LLSD ll_sd_from_color4(const LLColor4& c); |
69 | LLMediaImplExample2Maker(); | 68 | LLColor4 ll_color4_from_sd(const LLSD& sd); |
70 | LLMediaImplExample2* create() | ||
71 | { | ||
72 | return new LLMediaImplExample2(); | ||
73 | } | ||
74 | }; | ||
75 | 69 | ||
76 | #endif // LLMEDIAIMPLEXAMPLE2_H | 70 | #endif // LL_LLSDUTIL_MATH_H |