diff options
Diffstat (limited to 'linden/indra/llcharacter/llmotion.h')
-rw-r--r-- | linden/indra/llcharacter/llmotion.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/linden/indra/llcharacter/llmotion.h b/linden/indra/llcharacter/llmotion.h index c7bb55d..5a622a8 100644 --- a/linden/indra/llcharacter/llmotion.h +++ b/linden/indra/llcharacter/llmotion.h | |||
@@ -48,6 +48,8 @@ class LLCharacter; | |||
48 | //----------------------------------------------------------------------------- | 48 | //----------------------------------------------------------------------------- |
49 | class LLMotion | 49 | class LLMotion |
50 | { | 50 | { |
51 | friend class LLMotionController; | ||
52 | |||
51 | public: | 53 | public: |
52 | typedef enum LLMotionBlendType | 54 | typedef enum LLMotionBlendType |
53 | { | 55 | { |
@@ -73,10 +75,6 @@ public: | |||
73 | // functions to support MotionController and MotionRegistry | 75 | // functions to support MotionController and MotionRegistry |
74 | //------------------------------------------------------------------------- | 76 | //------------------------------------------------------------------------- |
75 | 77 | ||
76 | // static constructor | ||
77 | // all subclasses must implement such a function and register it | ||
78 | static LLMotion *create(const LLUUID &id) { return NULL; } | ||
79 | |||
80 | // get the name of this instance | 78 | // get the name of this instance |
81 | const std::string &getName() const { return mName; } | 79 | const std::string &getName() const { return mName; } |
82 | 80 | ||
@@ -96,7 +94,7 @@ public: | |||
96 | 94 | ||
97 | F32 getStopTime() const { return mStopTimestamp; } | 95 | F32 getStopTime() const { return mStopTimestamp; } |
98 | 96 | ||
99 | virtual void setStopTime(F32 time) { mStopTimestamp = time; mStopped = TRUE; } | 97 | virtual void setStopTime(F32 time); |
100 | 98 | ||
101 | BOOL isStopped() const { return mStopped; } | 99 | BOOL isStopped() const { return mStopped; } |
102 | 100 | ||
@@ -104,12 +102,18 @@ public: | |||
104 | 102 | ||
105 | BOOL isBlending(); | 103 | BOOL isBlending(); |
106 | 104 | ||
107 | void activate(); | 105 | // Activation functions. |
108 | 106 | // It is OK for other classes to activate a motion, | |
107 | // but only the controller can deactivate it. | ||
108 | // Thus, if mActive == TRUE, the motion *may* be on the controllers active list, | ||
109 | // but if mActive == FALSE, the motion is gauranteed not to be on the active list. | ||
110 | protected: | ||
111 | // Used by LLMotionController only | ||
109 | void deactivate(); | 112 | void deactivate(); |
110 | |||
111 | BOOL isActive() { return mActive; } | 113 | BOOL isActive() { return mActive; } |
112 | 114 | public: | |
115 | void activate(F32 time); | ||
116 | |||
113 | public: | 117 | public: |
114 | //------------------------------------------------------------------------- | 118 | //------------------------------------------------------------------------- |
115 | // animation callbacks to be implemented by subclasses | 119 | // animation callbacks to be implemented by subclasses |
@@ -170,14 +174,13 @@ protected: | |||
170 | BOOL mStopped; // motion has been stopped; | 174 | BOOL mStopped; // motion has been stopped; |
171 | BOOL mActive; // motion is on active list (can be stopped or not stopped) | 175 | BOOL mActive; // motion is on active list (can be stopped or not stopped) |
172 | 176 | ||
173 | public: | ||
174 | //------------------------------------------------------------------------- | 177 | //------------------------------------------------------------------------- |
175 | // these are set implicitly by the motion controller and | 178 | // these are set implicitly by the motion controller and |
176 | // may be referenced (read only) in the above handlers. | 179 | // may be referenced (read only) in the above handlers. |
177 | //------------------------------------------------------------------------- | 180 | //------------------------------------------------------------------------- |
178 | std::string mName; // instance name assigned by motion controller | 181 | std::string mName; // instance name assigned by motion controller |
179 | LLUUID mID; | 182 | LLUUID mID; |
180 | 183 | ||
181 | F32 mActivationTimestamp; // time when motion was activated | 184 | F32 mActivationTimestamp; // time when motion was activated |
182 | F32 mStopTimestamp; // time when motion was told to stop | 185 | F32 mStopTimestamp; // time when motion was told to stop |
183 | F32 mSendStopTimestamp; // time when simulator should be told to stop this motion | 186 | F32 mSendStopTimestamp; // time when simulator should be told to stop this motion |