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 "lldynamictexture.h"
00039 #include "llundo.h"
00040 #include "lltextbox.h"
00041 #include "llstrider.h"
00042 #include "llviewervisualparam.h"
00043 #include "llframetimer.h"
00044 #include "llviewerimage.h"
00045 
00046 class LLViewerJointMesh;
00047 class LLPolyMesh;
00048 class LLViewerObject;
00049 
00050 //-----------------------------------------------------------------------------
00051 // LLVisualParamHint
00052 //-----------------------------------------------------------------------------
00053 class LLVisualParamHint
00054 :       public LLDynamicTexture
00055 {
00056 public:
00057         LLVisualParamHint(
00058                 S32 pos_x, S32 pos_y,
00059                 S32 width, S32 height, 
00060                 LLViewerJointMesh *mesh, 
00061                 LLViewerVisualParam *param,
00062                 F32 param_weight);
00063         virtual ~LLVisualParamHint();
00064 
00065         BOOL                                    needsRender();
00066         void                                    preRender(BOOL clear_depth);
00067         BOOL                                    render();
00068         void                                    requestUpdate( S32 delay_frames ) {mNeedsUpdate = TRUE; mDelayFrames = delay_frames; }
00069         void                                    setUpdateDelayFrames( S32 delay_frames ) { mDelayFrames = delay_frames; }
00070         void                                    draw();
00071         
00072         LLViewerVisualParam*    getVisualParam() { return mVisualParam; }
00073         F32                                             getVisualParamWeight() { return mVisualParamWeight; }
00074         BOOL                                    getVisible() { return mIsVisible; }
00075 
00076         void                                    setAllowsUpdates( BOOL b ) { mAllowsUpdates = b; }
00077 
00078         const LLRect&                   getRect()       { return mRect; }
00079 
00080         // Requests updates for all instances (excluding two possible exceptions)  Grungy but efficient.
00081         static void                             requestHintUpdates( LLVisualParamHint* exception1 = NULL, LLVisualParamHint* exception2 = NULL );
00082 
00083 protected:
00084         BOOL                                    mNeedsUpdate;           // does this texture need to be re-rendered?
00085         BOOL                                    mIsVisible;                     // is this distortion hint visible?
00086         LLViewerJointMesh*              mJointMesh;                     // mesh that this distortion applies to
00087         LLViewerVisualParam*    mVisualParam;           // visual param applied by this hint
00088         F32                                             mVisualParamWeight;             // weight for this visual parameter
00089         BOOL                                    mAllowsUpdates;         // updates are blocked unless this is true
00090         S32                                             mDelayFrames;           // updates are blocked for this many frames
00091         LLRect                                  mRect;
00092         F32                                             mLastParamWeight;
00093 
00094         LLUIImagePtr mBackgroundp;
00095 
00096         typedef std::set<LLVisualParamHint*> instance_list_t;
00097         static instance_list_t 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 Fri May 16 08:34:07 2008 for SecondLife by  doxygen 1.5.5