diff options
author | Roxie Linden <roxie@lindenlab.com> | 2024-06-13 14:59:28 -0700 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2024-06-13 14:59:28 -0700 |
commit | 5e60392c273f0c9c5efa765a05414c618381780a (patch) | |
tree | d1eedbb1dfa86e66532a6d8746b7a81e5a444d3a /indra/llcharacter/llkeyframemotion.h | |
parent | 0f3c3563b0861e8ea82b201aab8343d99f993bbc (diff) | |
parent | 100ebbab2437de7f5d124a0d7b8279a7a7b57656 (diff) |
Merge branch 'develop' of github.com:secondlife/viewer into roxie/webrtc-voice
Diffstat (limited to 'indra/llcharacter/llkeyframemotion.h')
-rw-r--r-- | indra/llcharacter/llkeyframemotion.h | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/indra/llcharacter/llkeyframemotion.h b/indra/llcharacter/llkeyframemotion.h index b1c4f5afb7..d5b27c8102 100644 --- a/indra/llcharacter/llkeyframemotion.h +++ b/indra/llcharacter/llkeyframemotion.h @@ -86,9 +86,9 @@ public: //------------------------------------------------------------------------- // motions must specify whether or not they loop - virtual BOOL getLoop() { + virtual bool getLoop() { if (mJointMotionList) return mJointMotionList->mLoop; - else return FALSE; + else return false; } // motions must report their total duration @@ -135,14 +135,14 @@ public: virtual LLMotionInitStatus onInitialize(LLCharacter *character); // called when a motion is activated - // must return TRUE to indicate success, or else + // must return true to indicate success, or else // it will be deactivated - virtual BOOL onActivate(); + virtual bool onActivate(); // called per time step - // must return TRUE while it is active, and - // must return FALSE when the motion is completed. - virtual BOOL onUpdate(F32 time, U8* joint_mask); + // must return true while it is active, and + // must return false when the motion is completed. + virtual bool onUpdate(F32 time, U8* joint_mask); // called when a motion is deactivated virtual void onDeactivate(); @@ -155,14 +155,14 @@ public: public: U32 getFileSize(); - BOOL serialize(LLDataPacker& dp) const; - BOOL deserialize(LLDataPacker& dp, const LLUUID& asset_id, bool allow_invalid_joints = true); - BOOL isLoaded() { return mJointMotionList != NULL; } + bool serialize(LLDataPacker& dp) const; + bool deserialize(LLDataPacker& dp, const LLUUID& asset_id, bool allow_invalid_joints = true); + bool isLoaded() { return mJointMotionList != NULL; } bool dumpToFile(const std::string& name); // setters for modifying a keyframe animation - void setLoop(BOOL loop); + void setLoop(bool loop); F32 getLoopIn() { return (mJointMotionList) ? mJointMotionList->mLoopInPoint : 0.f; @@ -211,7 +211,7 @@ protected: mEaseInStopTime(0.f), mEaseOutStartTime(0.f), mEaseOutStopTime(0.f), - mUseTargetOffset(FALSE), + mUseTargetOffset(false), mConstraintType(CONSTRAINT_TYPE_POINT), mConstraintTargetType(CONSTRAINT_TARGET_TYPE_BODY), mSourceConstraintVolume(0), @@ -231,7 +231,7 @@ protected: F32 mEaseInStopTime; F32 mEaseOutStartTime; F32 mEaseOutStopTime; - BOOL mUseTargetOffset; + bool mUseTargetOffset; EConstraintType mConstraintType; EConstraintTargetType mConstraintTargetType; }; @@ -251,7 +251,7 @@ protected: LLVector3 mPositions[MAX_CHAIN_LENGTH]; F32 mJointLengths[MAX_CHAIN_LENGTH]; F32 mJointLengthFractions[MAX_CHAIN_LENGTH]; - BOOL mActive; + bool mActive; LLVector3d mGroundPos; LLVector3 mGroundNorm; LLJoint* mSourceVolume; @@ -271,7 +271,7 @@ protected: void applyConstraint(JointConstraint* constraintp, F32 time, U8* joint_mask); - BOOL setupPose(); + bool setupPose(); public: enum AssetStatus { ASSET_LOADED, ASSET_FETCHED, ASSET_NEEDS_FETCH, ASSET_FETCH_FAILED, ASSET_UNDEFINED }; @@ -398,7 +398,7 @@ public: public: std::vector<JointMotion*> mJointMotionArray; F32 mDuration; - BOOL mLoop; + bool mLoop; F32 mLoopInPoint; F32 mLoopOutPoint; F32 mEaseInDuration; @@ -413,12 +413,14 @@ public: // TODO: LLKeyframeDataCache::getKeyframeData should probably return a class containing // JointMotionList and mEmoteName, see LLKeyframeMotion::onInitialize. std::string mEmoteName; + LLUUID mEmoteID; + public: JointMotionList(); ~JointMotionList(); U32 dumpDiagInfo(); JointMotion* getJointMotion(U32 index) const { llassert(index < mJointMotionArray.size()); return mJointMotionArray[index]; } - U32 getNumJointMotions() const { return mJointMotionArray.size(); } + U32 getNumJointMotions() const { return static_cast<U32>(mJointMotionArray.size()); } }; protected: |