Annotation of /trunk/indra/newview/llvlcomposition.h
Parent Directory
|
Revision Log
Revision 137 - (view) (download)
| 1 : | mjm | 135 | /** |
| 2 : | * @file llvlcomposition.h | ||
| 3 : | * @brief Viewer-side representation of a composition layer... | ||
| 4 : | * | ||
| 5 : | * $LicenseInfo:firstyear=2001&license=viewergpl$ | ||
| 6 : | * | ||
| 7 : | mjm | 137 | * Copyright (c) 2001-2010, Linden Research, Inc. |
| 8 : | mjm | 135 | * |
| 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 | ||
| 21 : | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
| 22 : | * | ||
| 23 : | * By copying, modifying or distributing this software, you acknowledge | ||
| 24 : | * that you have read and understood your obligations described above, | ||
| 25 : | * and agree to abide by those obligations. | ||
| 26 : | * | ||
| 27 : | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
| 28 : | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
| 29 : | * COMPLETENESS OR PERFORMANCE. | ||
| 30 : | * $/LicenseInfo$ | ||
| 31 : | */ | ||
| 32 : | |||
| 33 : | #ifndef LL_LLVLCOMPOSITION_H | ||
| 34 : | #define LL_LLVLCOMPOSITION_H | ||
| 35 : | |||
| 36 : | #include "llviewerlayer.h" | ||
| 37 : | #include "llviewerimage.h" | ||
| 38 : | |||
| 39 : | class LLSurface; | ||
| 40 : | |||
| 41 : | class LLVLComposition : public LLViewerLayer | ||
| 42 : | { | ||
| 43 : | public: | ||
| 44 : | LLVLComposition(LLSurface *surfacep, const U32 width, const F32 scale); | ||
| 45 : | /*virtual*/ ~LLVLComposition(); | ||
| 46 : | |||
| 47 : | void setSurface(LLSurface *surfacep); | ||
| 48 : | |||
| 49 : | // Viewer side hack to generate composition values | ||
| 50 : | BOOL generateHeights(const F32 x, const F32 y, const F32 width, const F32 height); | ||
| 51 : | BOOL generateComposition(); | ||
| 52 : | // Generate texture from composition values. | ||
| 53 : | BOOL generateTexture(const F32 x, const F32 y, const F32 width, const F32 height); | ||
| 54 : | |||
| 55 : | // Use these as indeces ito the get/setters below that use 'corner' | ||
| 56 : | enum ECorner | ||
| 57 : | { | ||
| 58 : | SOUTHWEST = 0, | ||
| 59 : | SOUTHEAST = 1, | ||
| 60 : | NORTHWEST = 2, | ||
| 61 : | NORTHEAST = 3, | ||
| 62 : | CORNER_COUNT = 4 | ||
| 63 : | }; | ||
| 64 : | LLUUID getDetailTextureID(S32 corner); | ||
| 65 : | LLViewerImage* getDetailTexture(S32 corner); | ||
| 66 : | F32 getStartHeight(S32 corner); | ||
| 67 : | F32 getHeightRange(S32 corner); | ||
| 68 : | |||
| 69 : | void setDetailTextureID(S32 corner, const LLUUID& id); | ||
| 70 : | void setStartHeight(S32 corner, F32 start_height); | ||
| 71 : | void setHeightRange(S32 corner, F32 range); | ||
| 72 : | |||
| 73 : | friend class LLVOSurfacePatch; | ||
| 74 : | friend class LLDrawPoolTerrain; | ||
| 75 : | void setParamsReady() { mParamsReady = TRUE; } | ||
| 76 : | BOOL getParamsReady() const { return mParamsReady; } | ||
| 77 : | protected: | ||
| 78 : | BOOL mParamsReady; | ||
| 79 : | LLSurface *mSurfacep; | ||
| 80 : | BOOL mTexturesLoaded; | ||
| 81 : | |||
| 82 : | LLPointer<LLViewerImage> mDetailTextures[CORNER_COUNT]; | ||
| 83 : | LLPointer<LLImageRaw> mRawImages[CORNER_COUNT]; | ||
| 84 : | |||
| 85 : | F32 mStartHeight[CORNER_COUNT]; | ||
| 86 : | F32 mHeightRange[CORNER_COUNT]; | ||
| 87 : | |||
| 88 : | F32 mTexScaleX; | ||
| 89 : | F32 mTexScaleY; | ||
| 90 : | }; | ||
| 91 : | |||
| 92 : | #endif //LL_LLVLCOMPOSITION_H |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |

