llfloateranimpreview.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LLFLOATERANIMPREVIEW_H
00033 #define LL_LLFLOATERANIMPREVIEW_H
00034 
00035 #include "llfloaternamedesc.h"
00036 #include "lldynamictexture.h"
00037 #include "llcharacter.h"
00038 #include "llquaternion.h"
00039 
00040 class LLVOAvatar;
00041 class LLViewerJointMesh;
00042 
00043 class LLPreviewAnimation : public LLDynamicTexture
00044 {
00045 public:
00046         LLPreviewAnimation(S32 width, S32 height);
00047         virtual ~LLPreviewAnimation();
00048 
00049         BOOL    render();
00050         void    requestUpdate();
00051         void    rotate(F32 yaw_radians, F32 pitch_radians);
00052         void    zoom(F32 zoom_delta);
00053         void    setZoom(F32 zoom_amt);
00054         void    pan(F32 right, F32 up);
00055         virtual BOOL needsUpdate() { return mNeedsUpdate; }
00056 
00057         LLVOAvatar* getDummyAvatar() { return mDummyAvatar; }
00058 
00059 protected:
00060         BOOL                            mNeedsUpdate;
00061         F32                                     mCameraDistance;
00062         F32                                     mCameraYaw;
00063         F32                                     mCameraPitch;
00064         F32                                     mCameraZoom;
00065         LLVector3                       mCameraOffset;
00066         LLVector3                       mCameraRelPos;
00067         LLPointer<LLVOAvatar>                   mDummyAvatar;
00068 };
00069 
00070 class LLFloaterAnimPreview : public LLFloaterNameDesc
00071 {
00072 public:
00073         LLFloaterAnimPreview(const char* filename);
00074         virtual ~LLFloaterAnimPreview();
00075         
00076         BOOL postBuild();
00077 
00078         BOOL handleMouseDown(S32 x, S32 y, MASK mask);
00079         BOOL handleMouseUp(S32 x, S32 y, MASK mask);
00080         BOOL handleHover(S32 x, S32 y, MASK mask);
00081         BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); 
00082         void onMouseCaptureLost();
00083 
00084         void refresh();
00085 
00086         static void     onBtnPlay(void*);
00087         static void     onBtnStop(void*);
00088         static void setUploadAmount(S32 amount) { sUploadAmount = amount; }
00089         static void onSliderMove(LLUICtrl*, void*);
00090         static void onCommitBaseAnim(LLUICtrl*, void*);
00091         static void onCommitLoop(LLUICtrl*, void*);
00092         static void onCommitLoopIn(LLUICtrl*, void*);
00093         static void onCommitLoopOut(LLUICtrl*, void*);
00094         static BOOL validateLoopIn(LLUICtrl*, void*);
00095         static BOOL validateLoopOut(LLUICtrl*, void*);
00096         static void onCommitName(LLUICtrl*, void*);
00097         static void onCommitHandPose(LLUICtrl*, void*);
00098         static void onCommitEmote(LLUICtrl*, void*);
00099         static void onCommitPriority(LLUICtrl*, void*);
00100         static void onCommitEaseIn(LLUICtrl*, void*);
00101         static void onCommitEaseOut(LLUICtrl*, void*);
00102         static BOOL validateEaseIn(LLUICtrl*, void*);
00103         static BOOL validateEaseOut(LLUICtrl*, void*);
00104         static void     onBtnOK(void*);
00105         static void onSaveComplete(const LLUUID& asset_uuid,
00106                                                                            LLAssetType::EType type,
00107                                                                            void* user_data,
00108                                                                            S32 status, LLExtStat ext_status);
00109 protected:
00110         void                    draw();
00111         void                    resetMotion();
00112 
00113         LLPreviewAnimation* mAnimPreview;
00114         S32                                     mLastMouseX;
00115         S32                                     mLastMouseY;
00116         LLButton*                       mPlayButton;
00117         LLButton*                       mStopButton;
00118         F32                                     mLastSliderValue;
00119         LLRect                          mPreviewRect;
00120         LLRectf                         mPreviewImageRect;
00121         LLAssetID                       mMotionID;
00122         LLTransactionID         mTransactionID;
00123         BOOL                            mEnabled;
00124         LLAnimPauseRequest      mPauseRequest;
00125 
00126         std::map<LLString, LLUUID>      mIDList;
00127 
00128         static S32 sUploadAmount;
00129 };
00130 
00131 #endif  // LL_LLFLOATERANIMPREVIEW_H

Generated on Thu Jul 1 06:08:31 2010 for Second Life Viewer by  doxygen 1.4.7