diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-06-27 21:02:01 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-06-27 21:02:01 +0000 |
commit | 926ea0b39afd04cab469ca17b28f95ebf969e669 (patch) | |
tree | 40d5653e19160f72e7a0b80fadb9bdb93ef3575c /indra/llcharacter/llmotion.h | |
parent | 41877d457ab9542dca22b99f3eddb1bfcfe7c1d6 (diff) |
QAR-669 1.20 Viewer RC11
QAR-648 1.20 Viewer RC10
merge Branch_1-20-Viewer-2 -r 88724:90511 -> release
Diffstat (limited to 'indra/llcharacter/llmotion.h')
-rw-r--r-- | indra/llcharacter/llmotion.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/indra/llcharacter/llmotion.h b/indra/llcharacter/llmotion.h index 7669920339..50090e65e4 100644 --- a/indra/llcharacter/llmotion.h +++ b/indra/llcharacter/llmotion.h @@ -48,6 +48,8 @@ class LLCharacter; //----------------------------------------------------------------------------- class LLMotion { + friend class LLMotionController; + public: enum LLMotionBlendType { @@ -73,10 +75,6 @@ public: // functions to support MotionController and MotionRegistry //------------------------------------------------------------------------- - // static constructor - // all subclasses must implement such a function and register it - static LLMotion *create(const LLUUID &id) { return NULL; } - // get the name of this instance const std::string &getName() const { return mName; } @@ -96,7 +94,7 @@ public: F32 getStopTime() const { return mStopTimestamp; } - virtual void setStopTime(F32 time) { mStopTimestamp = time; mStopped = TRUE; } + virtual void setStopTime(F32 time); BOOL isStopped() const { return mStopped; } @@ -104,12 +102,18 @@ public: BOOL isBlending(); - void activate(); - + // Activation functions. + // It is OK for other classes to activate a motion, + // but only the controller can deactivate it. + // Thus, if mActive == TRUE, the motion *may* be on the controllers active list, + // but if mActive == FALSE, the motion is gauranteed not to be on the active list. +protected: + // Used by LLMotionController only void deactivate(); - BOOL isActive() { return mActive; } - +public: + void activate(F32 time); + public: //------------------------------------------------------------------------- // animation callbacks to be implemented by subclasses @@ -170,14 +174,13 @@ protected: BOOL mStopped; // motion has been stopped; BOOL mActive; // motion is on active list (can be stopped or not stopped) -public: //------------------------------------------------------------------------- // these are set implicitly by the motion controller and // may be referenced (read only) in the above handlers. //------------------------------------------------------------------------- std::string mName; // instance name assigned by motion controller LLUUID mID; - + F32 mActivationTimestamp; // time when motion was activated F32 mStopTimestamp; // time when motion was told to stop F32 mSendStopTimestamp; // time when simulator should be told to stop this motion |