diff options
author | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
commit | 38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch) | |
tree | adca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/newview/llemote.h | |
parent | README.txt (diff) | |
download | meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.zip meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.gz meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.bz2 meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.xz |
Second Life viewer sources 1.13.2.12
Diffstat (limited to 'linden/indra/newview/llemote.h')
-rw-r--r-- | linden/indra/newview/llemote.h | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/linden/indra/newview/llemote.h b/linden/indra/newview/llemote.h new file mode 100644 index 0000000..6296b66 --- /dev/null +++ b/linden/indra/newview/llemote.h | |||
@@ -0,0 +1,123 @@ | |||
1 | /** | ||
2 | * @file llemote.h | ||
3 | * @brief Definition of LLEmote class | ||
4 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | ||
6 | * | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
8 | * to you under the terms of the GNU General Public License, version 2.0 | ||
9 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
10 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
11 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
12 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
13 | * | ||
14 | * There are special exceptions to the terms and conditions of the GPL as | ||
15 | * it is applied to this Source Code. View the full text of the exception | ||
16 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
17 | * online at http://secondlife.com/developers/opensource/flossexception | ||
18 | * | ||
19 | * By copying, modifying or distributing this software, you acknowledge | ||
20 | * that you have read and understood your obligations described above, | ||
21 | * and agree to abide by those obligations. | ||
22 | * | ||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
25 | * COMPLETENESS OR PERFORMANCE. | ||
26 | */ | ||
27 | |||
28 | #ifndef LL_LLEMOTE_H | ||
29 | #define LL_LLEMOTE_H | ||
30 | |||
31 | //----------------------------------------------------------------------------- | ||
32 | // Header files | ||
33 | //----------------------------------------------------------------------------- | ||
34 | #include "llmotion.h" | ||
35 | #include "lltimer.h" | ||
36 | |||
37 | #define MIN_REQUIRED_PIXEL_AREA_EMOTE 2000.f | ||
38 | |||
39 | #define EMOTE_MORPH_FADEIN_TIME 0.3f | ||
40 | #define EMOTE_MORPH_IN_TIME 1.1f | ||
41 | #define EMOTE_MORPH_FADEOUT_TIME 1.4f | ||
42 | |||
43 | class LLVisualParam; | ||
44 | |||
45 | //----------------------------------------------------------------------------- | ||
46 | // class LLEmote | ||
47 | //----------------------------------------------------------------------------- | ||
48 | class LLEmote : | ||
49 | public LLMotion | ||
50 | { | ||
51 | public: | ||
52 | // Constructor | ||
53 | LLEmote(const LLUUID &id); | ||
54 | |||
55 | // Destructor | ||
56 | virtual ~LLEmote(); | ||
57 | |||
58 | public: | ||
59 | //------------------------------------------------------------------------- | ||
60 | // functions to support MotionController and MotionRegistry | ||
61 | //------------------------------------------------------------------------- | ||
62 | |||
63 | // static constructor | ||
64 | // all subclasses must implement such a function and register it | ||
65 | static LLMotion *create(const LLUUID &id) { return new LLEmote(id); } | ||
66 | |||
67 | public: | ||
68 | //------------------------------------------------------------------------- | ||
69 | // animation callbacks to be implemented by subclasses | ||
70 | //------------------------------------------------------------------------- | ||
71 | |||
72 | // motions must specify whether or not they loop | ||
73 | virtual BOOL getLoop() { return FALSE; } | ||
74 | |||
75 | // motions must report their total duration | ||
76 | virtual F32 getDuration() { return EMOTE_MORPH_FADEIN_TIME + EMOTE_MORPH_IN_TIME + EMOTE_MORPH_FADEOUT_TIME; } | ||
77 | |||
78 | // motions must report their "ease in" duration | ||
79 | virtual F32 getEaseInDuration() { return EMOTE_MORPH_FADEIN_TIME; } | ||
80 | |||
81 | // motions must report their "ease out" duration. | ||
82 | virtual F32 getEaseOutDuration() { return EMOTE_MORPH_FADEOUT_TIME; } | ||
83 | |||
84 | // called to determine when a motion should be activated/deactivated based on avatar pixel coverage | ||
85 | virtual F32 getMinPixelArea() { return MIN_REQUIRED_PIXEL_AREA_EMOTE; } | ||
86 | |||
87 | // motions must report their priority | ||
88 | virtual LLJoint::JointPriority getPriority() { return LLJoint::MEDIUM_PRIORITY; } | ||
89 | |||
90 | virtual LLMotionBlendType getBlendType() { return NORMAL_BLEND; } | ||
91 | |||
92 | // run-time (post constructor) initialization, | ||
93 | // called after parameters have been set | ||
94 | // must return true to indicate success and be available for activation | ||
95 | virtual LLMotionInitStatus onInitialize(LLCharacter *character); | ||
96 | |||
97 | // called when a motion is activated | ||
98 | // must return TRUE to indicate success, or else | ||
99 | // it will be deactivated | ||
100 | virtual BOOL onActivate(); | ||
101 | |||
102 | // called per time step | ||
103 | // must return TRUE while it is active, and | ||
104 | // must return FALSE when the motion is completed. | ||
105 | virtual BOOL onUpdate(F32 time, U8* joint_mask); | ||
106 | |||
107 | // called when a motion is deactivated | ||
108 | virtual void onDeactivate(); | ||
109 | |||
110 | static BOOL getIndexFromName( const char* name, U32* index ); | ||
111 | |||
112 | protected: | ||
113 | |||
114 | LLCharacter* mCharacter; | ||
115 | |||
116 | LLVisualParam* mParam; | ||
117 | }; | ||
118 | |||
119 | |||
120 | |||
121 | #endif // LL_LLEMOTE_H | ||
122 | |||
123 | |||