diff options
Diffstat (limited to 'indra/llcharacter/llvisualparam.h')
-rw-r--r-- | indra/llcharacter/llvisualparam.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/llcharacter/llvisualparam.h b/indra/llcharacter/llvisualparam.h index 25c41e8509..eec56d7844 100644 --- a/indra/llcharacter/llvisualparam.h +++ b/indra/llcharacter/llvisualparam.h @@ -36,6 +36,7 @@ #include "v3math.h" #include "llstring.h" #include "llxmltree.h" +#include <boost/function.hpp> class LLPolyMesh; class LLXmlTreeNode; @@ -68,6 +69,10 @@ public: virtual ~LLVisualParamInfo() {}; virtual BOOL parseXml(LLXmlTreeNode *node); + + S32 getID() const { return mID; } + + virtual void toStream(std::ostream &out); protected: S32 mID; // ID associated with VisualParam @@ -92,6 +97,8 @@ protected: class LLVisualParam { public: + typedef boost::function<LLVisualParam*(S32)> visual_param_mapper; + LLVisualParam(); virtual ~LLVisualParam(); @@ -111,6 +118,9 @@ public: virtual void animate(F32 delta, BOOL set_by_user); virtual void stopAnimating(BOOL set_by_user); + virtual BOOL linkDrivenParams(visual_param_mapper mapper, BOOL only_cross_params); + virtual void resetDrivenParams(); + // Interface methods S32 getID() const { return mID; } void setID(S32 id) { llassert(!mInfo); mID = id; } @@ -138,15 +148,19 @@ public: LLVisualParam* getNextParam() { return mNext; } void setNextParam( LLVisualParam *next ); - virtual void setAnimating(BOOL is_animating) { mIsAnimating = is_animating; } + virtual void setAnimating(BOOL is_animating) { mIsAnimating = is_animating && !mIsDummy; } BOOL getAnimating() const { return mIsAnimating; } + void setIsDummy(BOOL is_dummy) { mIsDummy = is_dummy; } + protected: F32 mCurWeight; // current weight F32 mLastWeight; // last weight LLVisualParam* mNext; // next param in a shared chain F32 mTargetWeight; // interpolation target BOOL mIsAnimating; // this value has been given an interpolation target + BOOL mIsDummy; // this is used to prevent dummy visual params from animating + S32 mID; // id for storing weight/morphtarget compares compactly LLVisualParamInfo *mInfo; |