aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lltoolmorph.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:46 -0500
committerJacek Antonelli2008-08-15 23:44:46 -0500
commit38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch)
treeadca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/newview/lltoolmorph.h
parentREADME.txt (diff)
downloadmeta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.zip
meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.gz
meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.bz2
meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.xz
Second Life viewer sources 1.13.2.12
Diffstat (limited to 'linden/indra/newview/lltoolmorph.h')
-rw-r--r--linden/indra/newview/lltoolmorph.h107
1 files changed, 107 insertions, 0 deletions
diff --git a/linden/indra/newview/lltoolmorph.h b/linden/indra/newview/lltoolmorph.h
new file mode 100644
index 0000000..ab1bf20
--- /dev/null
+++ b/linden/indra/newview/lltoolmorph.h
@@ -0,0 +1,107 @@
1/**
2 * @file lltoolmorph.h
3 * @brief A tool to select object faces.
4 *
5 * Copyright (c) 2001-2007, Linden Research, Inc.
6 *
7 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement
10 * ("Other License"), formally executed by you and Linden Lab. Terms of
11 * the GPL can be found in doc/GPL-license.txt in this distribution, or
12 * online at http://secondlife.com/developers/opensource/gplv2
13 *
14 * There are special exceptions to the terms and conditions of the GPL as
15 * it is applied to this Source Code. View the full text of the exception
16 * in the file doc/FLOSS-exception.txt in this software distribution, or
17 * online at http://secondlife.com/developers/opensource/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 LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
24 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
25 * COMPLETENESS OR PERFORMANCE.
26 */
27
28#ifndef LL_LLTOOLMORPH_H
29#define LL_LLTOOLMORPH_H
30
31#include "lltool.h"
32#include "m4math.h"
33#include "v2math.h"
34#include "linked_lists.h"
35#include "lldynamictexture.h"
36#include "llundo.h"
37#include "lltextbox.h"
38#include "llstrider.h"
39#include "llviewervisualparam.h"
40#include "llframetimer.h"
41#include "llviewerimage.h"
42
43class LLViewerJointMesh;
44class LLPolyMesh;
45class LLViewerObject;
46
47//-----------------------------------------------------------------------------
48// LLVisualParamHint
49//-----------------------------------------------------------------------------
50class LLVisualParamHint
51: public LLDynamicTexture
52{
53public:
54 LLVisualParamHint(
55 S32 pos_x, S32 pos_y,
56 S32 width, S32 height,
57 LLViewerJointMesh *mesh,
58 LLViewerVisualParam *param,
59 F32 param_weight);
60 virtual ~LLVisualParamHint();
61
62 BOOL needsRender();
63 void preRender(BOOL clear_depth);
64 BOOL render();
65 void requestUpdate( S32 delay_frames ) {mNeedsUpdate = TRUE; mDelayFrames = delay_frames; }
66 void setUpdateDelayFrames( S32 delay_frames ) { mDelayFrames = delay_frames; }
67 void draw();
68
69 LLViewerVisualParam* getVisualParam() { return mVisualParam; }
70 F32 getVisualParamWeight() { return mVisualParamWeight; }
71 BOOL getVisible() { return mIsVisible; }
72
73 void setAllowsUpdates( BOOL b ) { mAllowsUpdates = b; }
74
75 const LLRect& getRect() { return mRect; }
76
77 // Requests updates for all instances (excluding two possible exceptions) Grungy but efficient.
78 static void requestHintUpdates( LLVisualParamHint* exception1 = NULL, LLVisualParamHint* exception2 = NULL );
79
80protected:
81 BOOL mNeedsUpdate; // does this texture need to be re-rendered?
82 BOOL mIsVisible; // is this distortion hint visible?
83 LLViewerJointMesh* mJointMesh; // mesh that this distortion applies to
84 LLViewerVisualParam* mVisualParam; // visual param applied by this hint
85 F32 mVisualParamWeight; // weight for this visual parameter
86 BOOL mAllowsUpdates; // updates are blocked unless this is true
87 S32 mDelayFrames; // updates are blocked for this many frames
88 LLRect mRect;
89 F32 mLastParamWeight;
90
91 LLPointer<LLViewerImage> mBackgroundp;
92
93 static LLLinkedList<LLVisualParamHint> sInstances;
94};
95
96// this class resets avatar data at the end of an update cycle
97class LLVisualParamReset : public LLDynamicTexture
98{
99public:
100 LLVisualParamReset();
101 /*virtual */ BOOL render();
102
103 static BOOL sDirty;
104};
105
106#endif
107