00001 00032 #ifndef LL_LLViewerVisualParam_H 00033 #define LL_LLViewerVisualParam_H 00034 00035 #include "v3math.h" 00036 #include "llstring.h" 00037 #include "llvisualparam.h" 00038 00039 //----------------------------------------------------------------------------- 00040 // LLViewerVisualParamInfo 00041 //----------------------------------------------------------------------------- 00042 class LLViewerVisualParamInfo : public LLVisualParamInfo 00043 { 00044 friend class LLViewerVisualParam; 00045 public: 00046 LLViewerVisualParamInfo(); 00047 /*virtual*/ ~LLViewerVisualParamInfo(); 00048 00049 /*virtual*/ BOOL parseXml(LLXmlTreeNode* node); 00050 00051 protected: 00052 S32 mWearableType; 00053 LLString mEditGroup; 00054 F32 mCamDist; 00055 F32 mCamAngle; // degrees 00056 F32 mCamElevation; 00057 LLString mCamTargetName; 00058 F32 mEditGroupDisplayOrder; 00059 BOOL mShowSimple; // show edit controls when in "simple ui" mode? 00060 F32 mSimpleMin; // when in simple UI, apply this minimum, range 0.f to 100.f 00061 F32 mSimpleMax; // when in simple UI, apply this maximum, range 0.f to 100.f 00062 }; 00063 00064 //----------------------------------------------------------------------------- 00065 // LLViewerVisualParam 00066 // VIRTUAL CLASS 00067 // a viewer side interface class for a generalized parametric modification of the avatar mesh 00068 //----------------------------------------------------------------------------- 00069 class LLViewerVisualParam : public LLVisualParam 00070 { 00071 public: 00072 LLViewerVisualParam(); 00073 /*virtual*/ ~LLViewerVisualParam(){}; 00074 00075 // Special: These functions are overridden by child classes 00076 LLViewerVisualParamInfo *getInfo() const { return (LLViewerVisualParamInfo*)mInfo; }; 00077 // This sets mInfo and calls initialization functions 00078 BOOL setInfo(LLViewerVisualParamInfo *info); 00079 00080 // LLVisualParam Virtual functions 00082 00083 // New Virtual functions 00084 virtual F32 getTotalDistortion() = 0; 00085 virtual const LLVector3& getAvgDistortion() = 0; 00086 virtual F32 getMaxDistortion() = 0; 00087 virtual LLVector3 getVertexDistortion(S32 index, LLPolyMesh *mesh) = 0; 00088 virtual const LLVector3* getFirstDistortion(U32 *index, LLPolyMesh **mesh) = 0; 00089 virtual const LLVector3* getNextDistortion(U32 *index, LLPolyMesh **mesh) = 0; 00090 00091 // interface methods 00092 F32 getDisplayOrder() { return getInfo()->mEditGroupDisplayOrder; } 00093 S32 getWearableType() const { return getInfo()->mWearableType; } 00094 const LLString& getEditGroup() const { return getInfo()->mEditGroup; } 00095 00096 F32 getCameraDistance() const { return getInfo()->mCamDist; } 00097 F32 getCameraAngle() const { return getInfo()->mCamAngle; } // degrees 00098 F32 getCameraElevation() const { return getInfo()->mCamElevation; } 00099 const std::string& getCameraTargetName() const { return getInfo()->mCamTargetName; } 00100 00101 BOOL getShowSimple() const { return getInfo()->mShowSimple; } 00102 F32 getSimpleMin() const { return getInfo()->mSimpleMin; } 00103 F32 getSimpleMax() const { return getInfo()->mSimpleMax; } 00104 }; 00105 00106 #endif // LL_LLViewerVisualParam_H