diff options
| author | Bryan O'Sullivan <bos@lindenlab.com> | 2009-06-22 15:02:19 -0700 |
|---|---|---|
| committer | Bryan O'Sullivan <bos@lindenlab.com> | 2009-06-22 15:02:19 -0700 |
| commit | baa73fddd9287ddafd2d31551cb253b355ed910a (patch) | |
| tree | e3f0986617fe6c0ee0a14df6aac13c6bb6f92507 /indra/llcharacter | |
| parent | dc3833f31b8a20220ddb1775e1625c016c397435 (diff) | |
| parent | fcaa1ad46fd1df4cfec9dee12caf6e7b5bf32136 (diff) | |
Merge with viewer-2.0.0-3 branch
Diffstat (limited to 'indra/llcharacter')
| -rw-r--r-- | indra/llcharacter/llcharacter.h | 10 | ||||
| -rw-r--r-- | indra/llcharacter/lleditingmotion.cpp | 8 | ||||
| -rw-r--r-- | indra/llcharacter/llmotioncontroller.cpp | 4 | ||||
| -rw-r--r-- | indra/llcharacter/llmotioncontroller.h | 6 | ||||
| -rw-r--r-- | indra/llcharacter/llvisualparam.h | 22 |
5 files changed, 21 insertions, 29 deletions
diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h index 66c4c188ed..cd8f9e63fb 100644 --- a/indra/llcharacter/llcharacter.h +++ b/indra/llcharacter/llcharacter.h @@ -169,7 +169,7 @@ public: void updateMotions(e_update_t update_type); LLAnimPauseRequest requestPause(); - BOOL areAnimationsPaused() { return mMotionController.isPaused(); } + BOOL areAnimationsPaused() const { return mMotionController.isPaused(); } void setAnimTimeFactor(F32 factor) { mMotionController.setTimeFactor(factor); } void setTimeStep(F32 time_step) { mMotionController.setTimeStep(time_step); } @@ -231,9 +231,9 @@ public: return (mCurIterator++)->second; } - LLVisualParam* getVisualParam(S32 id) + LLVisualParam* getVisualParam(S32 id) const { - VisualParamIndexMap_t::iterator iter = mVisualParamIndexMap.find(id); + VisualParamIndexMap_t::const_iterator iter = mVisualParamIndexMap.find(id); return (iter == mVisualParamIndexMap.end()) ? 0 : iter->second; } S32 getVisualParamID(LLVisualParam *id) @@ -246,11 +246,11 @@ public: } return 0; } - S32 getVisualParamCount() { return (S32)mVisualParamIndexMap.size(); } + S32 getVisualParamCount() const { return (S32)mVisualParamIndexMap.size(); } LLVisualParam* getVisualParam(const char *name); - ESex getSex() { return mSex; } + ESex getSex() const { return mSex; } void setSex( ESex sex ) { mSex = sex; } U32 getAppearanceSerialNum() const { return mAppearanceSerialNum; } diff --git a/indra/llcharacter/lleditingmotion.cpp b/indra/llcharacter/lleditingmotion.cpp index 6907df82d4..381d19e614 100644 --- a/indra/llcharacter/lleditingmotion.cpp +++ b/indra/llcharacter/lleditingmotion.cpp @@ -187,14 +187,6 @@ BOOL LLEditingMotion::onUpdate(F32 time, U8* joint_mask) } focus_pt += mCharacter->getCharacterPosition(); - if (!llfinite(focus_pt.magVecSquared())) - { - LLVector3 tmp = mCharacter->getCharacterPosition() ; - LL_WARNS_ONCE("Animation") << "Non finite focus point in editing motion. focus point: " << focus_pt << " and character position: " << - tmp << " and pointAtPt: " << pointAtPt << - " - ignoring anim" << LL_ENDL; - return FALSE; - } // propagate joint positions to kinematic chain mParentJoint.setPosition( mParentState->getJoint()->getWorldPosition() ); diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 006d2b5f62..bb9625b2bd 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -1019,9 +1019,9 @@ bool LLMotionController::isMotionLoading(LLMotion* motion) //----------------------------------------------------------------------------- // findMotion() //----------------------------------------------------------------------------- -LLMotion* LLMotionController::findMotion(const LLUUID& id) +LLMotion* LLMotionController::findMotion(const LLUUID& id) const { - motion_map_t::iterator iter = mAllMotions.find(id); + motion_map_t::const_iterator iter = mAllMotions.find(id); if(iter == mAllMotions.end()) { return NULL; diff --git a/indra/llcharacter/llmotioncontroller.h b/indra/llcharacter/llmotioncontroller.h index 9271483a25..5c3ec223cb 100644 --- a/indra/llcharacter/llmotioncontroller.h +++ b/indra/llcharacter/llmotioncontroller.h @@ -153,12 +153,12 @@ public: // pause and continue all motions void pauseAllMotions(); void unpauseAllMotions(); - BOOL isPaused() { return mPaused; } + BOOL isPaused() const { return mPaused; } void setTimeStep(F32 step); void setTimeFactor(F32 time_factor); - F32 getTimeFactor() { return mTimeFactor; } + F32 getTimeFactor() const { return mTimeFactor; } motion_list_t& getActiveMotions() { return mActiveMotions; } @@ -167,7 +167,7 @@ public: //protected: bool isMotionActive( LLMotion *motion ); bool isMotionLoading( LLMotion *motion ); - LLMotion *findMotion( const LLUUID& id ); + LLMotion *findMotion( const LLUUID& id ) const; protected: // internal operations act on motion instances directly diff --git a/indra/llcharacter/llvisualparam.h b/indra/llcharacter/llvisualparam.h index 3a0c1bbc77..25c41e8509 100644 --- a/indra/llcharacter/llvisualparam.h +++ b/indra/llcharacter/llvisualparam.h @@ -112,7 +112,7 @@ public: virtual void stopAnimating(BOOL set_by_user); // Interface methods - S32 getID() { return mID; } + S32 getID() const { return mID; } void setID(S32 id) { llassert(!mInfo); mID = id; } const std::string& getName() const { return mInfo->mName; } @@ -124,22 +124,22 @@ public: void setMaxDisplayName(const std::string& s) { mInfo->mMaxName = s; } void setMinDisplayName(const std::string& s) { mInfo->mMinName = s; } - EVisualParamGroup getGroup() { return mInfo->mGroup; } - F32 getMinWeight() { return mInfo->mMinWeight; } - F32 getMaxWeight() { return mInfo->mMaxWeight; } - F32 getDefaultWeight() { return mInfo->mDefaultWeight; } - ESex getSex() { return mInfo->mSex; } + EVisualParamGroup getGroup() const { return mInfo->mGroup; } + F32 getMinWeight() const { return mInfo->mMinWeight; } + F32 getMaxWeight() const { return mInfo->mMaxWeight; } + F32 getDefaultWeight() const { return mInfo->mDefaultWeight; } + ESex getSex() const { return mInfo->mSex; } - F32 getWeight() { return mIsAnimating ? mTargetWeight : mCurWeight; } - F32 getCurrentWeight() { return mCurWeight; } - F32 getLastWeight() { return mLastWeight; } - BOOL isAnimating() { return mIsAnimating; } + F32 getWeight() const { return mIsAnimating ? mTargetWeight : mCurWeight; } + F32 getCurrentWeight() const { return mCurWeight; } + F32 getLastWeight() const { return mLastWeight; } + BOOL isAnimating() const { return mIsAnimating; } LLVisualParam* getNextParam() { return mNext; } void setNextParam( LLVisualParam *next ); virtual void setAnimating(BOOL is_animating) { mIsAnimating = is_animating; } - BOOL getAnimating() { return mIsAnimating; } + BOOL getAnimating() const { return mIsAnimating; } protected: F32 mCurWeight; // current weight |
