lltoolmorph.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LLTOOLMORPH_H
00033 #define LL_LLTOOLMORPH_H
00034 
00035 #include "lltool.h"
00036 #include "m4math.h"
00037 #include "v2math.h"
00038 #include "linked_lists.h"
00039 #include "lldynamictexture.h"
00040 #include "llundo.h"
00041 #include "lltextbox.h"
00042 #include "llstrider.h"
00043 #include "llviewervisualparam.h"
00044 #include "llframetimer.h"
00045 #include "llviewerimage.h"
00046 
00047 class LLViewerJointMesh;
00048 class LLPolyMesh;
00049 class LLViewerObject;
00050 
00051 //-----------------------------------------------------------------------------
00052 // LLVisualParamHint
00053 //-----------------------------------------------------------------------------
00054 class LLVisualParamHint
00055 :       public LLDynamicTexture
00056 {
00057 public:
00058         LLVisualParamHint(
00059                 S32 pos_x, S32 pos_y,
00060                 S32 width, S32 height, 
00061                 LLViewerJointMesh *mesh, 
00062                 LLViewerVisualParam *param,
00063                 F32 param_weight);
00064         virtual ~LLVisualParamHint();
00065 
00066         BOOL                                    needsRender();
00067         void                                    preRender(BOOL clear_depth);
00068         BOOL                                    render();
00069         void                                    requestUpdate( S32 delay_frames ) {mNeedsUpdate = TRUE; mDelayFrames = delay_frames; }
00070         void                                    setUpdateDelayFrames( S32 delay_frames ) { mDelayFrames = delay_frames; }
00071         void                                    draw();
00072         
00073         LLViewerVisualParam*    getVisualParam() { return mVisualParam; }
00074         F32                                             getVisualParamWeight() { return mVisualParamWeight; }
00075         BOOL                                    getVisible() { return mIsVisible; }
00076 
00077         void                                    setAllowsUpdates( BOOL b ) { mAllowsUpdates = b; }
00078 
00079         const LLRect&                   getRect()       { return mRect; }
00080 
00081         // Requests updates for all instances (excluding two possible exceptions)  Grungy but efficient.
00082         static void                             requestHintUpdates( LLVisualParamHint* exception1 = NULL, LLVisualParamHint* exception2 = NULL );
00083 
00084 protected:
00085         BOOL                                    mNeedsUpdate;           // does this texture need to be re-rendered?
00086         BOOL                                    mIsVisible;                     // is this distortion hint visible?
00087         LLViewerJointMesh*              mJointMesh;                     // mesh that this distortion applies to
00088         LLViewerVisualParam*    mVisualParam;           // visual param applied by this hint
00089         F32                                             mVisualParamWeight;             // weight for this visual parameter
00090         BOOL                                    mAllowsUpdates;         // updates are blocked unless this is true
00091         S32                                             mDelayFrames;           // updates are blocked for this many frames
00092         LLRect                                  mRect;
00093         F32                                             mLastParamWeight;
00094 
00095         LLPointer<LLViewerImage> mBackgroundp;
00096         
00097         static LLLinkedList<LLVisualParamHint> sInstances;
00098 };
00099 
00100 // this class resets avatar data at the end of an update cycle
00101 class LLVisualParamReset : public LLDynamicTexture
00102 {
00103 public:
00104         LLVisualParamReset();
00105         /*virtual */ BOOL render();
00106 
00107         static BOOL sDirty;
00108 };
00109 
00110 #endif
00111 

Generated on Thu Jul 1 06:09:22 2010 for Second Life Viewer by  doxygen 1.4.7