diff options
Diffstat (limited to 'linden/indra/newview/llfloateranimpreview.h')
-rw-r--r-- | linden/indra/newview/llfloateranimpreview.h | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/linden/indra/newview/llfloateranimpreview.h b/linden/indra/newview/llfloateranimpreview.h new file mode 100644 index 0000000..fea10d7 --- /dev/null +++ b/linden/indra/newview/llfloateranimpreview.h | |||
@@ -0,0 +1,127 @@ | |||
1 | /** | ||
2 | * @file llfloateranimpreview.h | ||
3 | * @brief LLFloaterAnimPreview class definition | ||
4 | * | ||
5 | * Copyright (c) 2004-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_LLFLOATERANIMPREVIEW_H | ||
29 | #define LL_LLFLOATERANIMPREVIEW_H | ||
30 | |||
31 | #include "llfloaternamedesc.h" | ||
32 | #include "lldynamictexture.h" | ||
33 | #include "llcharacter.h" | ||
34 | #include "llquaternion.h" | ||
35 | |||
36 | class LLVOAvatar; | ||
37 | class LLViewerJointMesh; | ||
38 | |||
39 | class LLPreviewAnimation : public LLDynamicTexture | ||
40 | { | ||
41 | public: | ||
42 | LLPreviewAnimation(S32 width, S32 height); | ||
43 | virtual ~LLPreviewAnimation(); | ||
44 | |||
45 | BOOL render(); | ||
46 | void requestUpdate(); | ||
47 | void rotate(F32 yaw_radians, F32 pitch_radians); | ||
48 | void zoom(F32 zoom_delta); | ||
49 | void setZoom(F32 zoom_amt); | ||
50 | void pan(F32 right, F32 up); | ||
51 | virtual BOOL needsUpdate() { return mNeedsUpdate; } | ||
52 | |||
53 | LLVOAvatar* getDummyAvatar() { return mDummyAvatar; } | ||
54 | |||
55 | protected: | ||
56 | BOOL mNeedsUpdate; | ||
57 | F32 mCameraDistance; | ||
58 | F32 mCameraYaw; | ||
59 | F32 mCameraPitch; | ||
60 | F32 mCameraZoom; | ||
61 | LLVector3 mCameraOffset; | ||
62 | LLVector3 mCameraRelPos; | ||
63 | LLVOAvatar* mDummyAvatar; | ||
64 | }; | ||
65 | |||
66 | class LLFloaterAnimPreview : public LLFloaterNameDesc | ||
67 | { | ||
68 | public: | ||
69 | LLFloaterAnimPreview(const char* filename); | ||
70 | virtual ~LLFloaterAnimPreview(); | ||
71 | |||
72 | BOOL postBuild(); | ||
73 | |||
74 | BOOL handleMouseDown(S32 x, S32 y, MASK mask); | ||
75 | BOOL handleMouseUp(S32 x, S32 y, MASK mask); | ||
76 | BOOL handleHover(S32 x, S32 y, MASK mask); | ||
77 | BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); | ||
78 | |||
79 | void refresh(); | ||
80 | |||
81 | static void onMouseCaptureLost(LLMouseHandler*); | ||
82 | static void onBtnPlay(void*); | ||
83 | static void onBtnStop(void*); | ||
84 | static void setUploadAmount(S32 amount) { sUploadAmount = amount; } | ||
85 | static void onSliderMove(LLUICtrl*, void*); | ||
86 | static void onCommitBaseAnim(LLUICtrl*, void*); | ||
87 | static void onCommitLoop(LLUICtrl*, void*); | ||
88 | static void onCommitLoopIn(LLUICtrl*, void*); | ||
89 | static void onCommitLoopOut(LLUICtrl*, void*); | ||
90 | static BOOL validateLoopIn(LLUICtrl*, void*); | ||
91 | static BOOL validateLoopOut(LLUICtrl*, void*); | ||
92 | static void onCommitName(LLUICtrl*, void*); | ||
93 | static void onCommitHandPose(LLUICtrl*, void*); | ||
94 | static void onCommitEmote(LLUICtrl*, void*); | ||
95 | static void onCommitPriority(LLUICtrl*, void*); | ||
96 | static void onCommitEaseIn(LLUICtrl*, void*); | ||
97 | static void onCommitEaseOut(LLUICtrl*, void*); | ||
98 | static BOOL validateEaseIn(LLUICtrl*, void*); | ||
99 | static BOOL validateEaseOut(LLUICtrl*, void*); | ||
100 | static void onBtnOK(void*); | ||
101 | static void onSaveComplete(const LLUUID& asset_uuid, | ||
102 | LLAssetType::EType type, | ||
103 | void* user_data, | ||
104 | S32 status); | ||
105 | protected: | ||
106 | void draw(); | ||
107 | void resetMotion(); | ||
108 | |||
109 | LLPreviewAnimation* mAnimPreview; | ||
110 | S32 mLastMouseX; | ||
111 | S32 mLastMouseY; | ||
112 | LLButton* mPlayButton; | ||
113 | LLButton* mStopButton; | ||
114 | F32 mLastSliderValue; | ||
115 | LLRect mPreviewRect; | ||
116 | LLRectf mPreviewImageRect; | ||
117 | LLAssetID mMotionID; | ||
118 | LLTransactionID mTransactionID; | ||
119 | BOOL mEnabled; | ||
120 | LLAnimPauseRequest mPauseRequest; | ||
121 | |||
122 | std::map<LLString, LLUUID> mIDList; | ||
123 | |||
124 | static S32 sUploadAmount; | ||
125 | }; | ||
126 | |||
127 | #endif // LL_LLFLOATERANIMPREVIEW_H | ||