00001
00032 #ifndef LL_LLHANDMOTION_H
00033 #define LL_LLHANDMOTION_H
00034
00035
00036
00037
00038 #include "llmotion.h"
00039 #include "lltimer.h"
00040
00041 #define MIN_REQUIRED_PIXEL_AREA_HAND 10000.f;
00042
00043
00044
00045
00046 class LLHandMotion :
00047 public LLMotion
00048 {
00049 public:
00050 typedef enum e_hand_pose
00051 {
00052 HAND_POSE_SPREAD,
00053 HAND_POSE_RELAXED,
00054 HAND_POSE_POINT,
00055 HAND_POSE_FIST,
00056 HAND_POSE_RELAXED_L,
00057 HAND_POSE_POINT_L,
00058 HAND_POSE_FIST_L,
00059 HAND_POSE_RELAXED_R,
00060 HAND_POSE_POINT_R,
00061 HAND_POSE_FIST_R,
00062 HAND_POSE_SALUTE_R,
00063 HAND_POSE_TYPING,
00064 HAND_POSE_PEACE_R,
00065 HAND_POSE_PALM_R,
00066 NUM_HAND_POSES
00067 } eHandPose;
00068
00069
00070 LLHandMotion(const LLUUID &id);
00071
00072
00073 virtual ~LLHandMotion();
00074
00075 public:
00076
00077
00078
00079
00080
00081
00082 static LLMotion *create(const LLUUID &id) { return new LLHandMotion(id); }
00083
00084 public:
00085
00086
00087
00088
00089
00090 virtual BOOL getLoop() { return TRUE; }
00091
00092
00093 virtual F32 getDuration() { return 0.0; }
00094
00095
00096 virtual F32 getEaseInDuration() { return 0.0; }
00097
00098
00099 virtual F32 getEaseOutDuration() { return 0.0; }
00100
00101
00102 virtual F32 getMinPixelArea() { return MIN_REQUIRED_PIXEL_AREA_HAND; }
00103
00104
00105 virtual LLJoint::JointPriority getPriority() { return LLJoint::MEDIUM_PRIORITY; }
00106
00107 virtual LLMotionBlendType getBlendType() { return NORMAL_BLEND; }
00108
00109
00110
00111
00112 virtual LLMotionInitStatus onInitialize(LLCharacter *character);
00113
00114
00115
00116
00117 virtual BOOL onActivate();
00118
00119
00120
00121
00122 virtual BOOL onUpdate(F32 time, U8* joint_mask);
00123
00124
00125 virtual void onDeactivate();
00126
00127 static LLString getHandPoseName(eHandPose pose);
00128 static eHandPose getHandPose(LLString posename);
00129
00130 public:
00131
00132
00133
00134
00135 LLCharacter *mCharacter;
00136
00137 F32 mLastTime;
00138 eHandPose mCurrentPose;
00139 eHandPose mNewPose;
00140 };
00141 #endif // LL_LLHANDMOTION_H
00142