llkeyframestandmotion.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /**
  2. * @file llkeyframestandmotion.h
  3. * @brief Implementation of LLKeyframeStandMotion class.
  4. *
  5. * $LicenseInfo:firstyear=2001&license=viewergpl$
  6. *
  7. * Copyright (c) 2001-2009, Linden Research, Inc.
  8. *
  9. * Second Life Viewer Source Code
  10. * The source code in this file ("Source Code") is provided by Linden Lab
  11. * to you under the terms of the GNU General Public License, version 2.0
  12. * ("GPL"), unless you have obtained a separate licensing agreement
  13. * ("Other License"), formally executed by you and Linden Lab. Terms of
  14. * the GPL can be found in doc/GPL-license.txt in this distribution, or
  15. * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  16. *
  17. * There are special exceptions to the terms and conditions of the GPL as
  18. * it is applied to this Source Code. View the full text of the exception
  19. * in the file doc/FLOSS-exception.txt in this software distribution, or
  20. * online at
  21. * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  22. *
  23. * By copying, modifying or distributing this software, you acknowledge
  24. * that you have read and understood your obligations described above,
  25. * and agree to abide by those obligations.
  26. *
  27. * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  28. * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  29. * COMPLETENESS OR PERFORMANCE.
  30. * $/LicenseInfo$
  31. */
  32. #ifndef LL_LLKEYFRAMESTANDMOTION_H
  33. #define LL_LLKEYFRAMESTANDMOTION_H
  34. #include "lljointsolverrp3.h"
  35. #include "llkeyframemotion.h"
  36. class LLKeyframeStandMotion final : public LLKeyframeMotion
  37. {
  38. protected:
  39. LOG_CLASS(LLKeyframeStandMotion);
  40. public:
  41. LLKeyframeStandMotion(const LLUUID& id);
  42. LL_INLINE static LLMotion* create(const LLUUID& id)
  43. {
  44. return new LLKeyframeStandMotion(id);
  45. }
  46. LLMotionInitStatus onInitialize(LLCharacter* character) override;
  47. bool onActivate() override;
  48. bool onUpdate(F32 time, U8* joint_mask) override;
  49. void onDeactivate() override;
  50. public:
  51. LLJoint mPelvisJoint;
  52. LLJoint mHipLeftJoint;
  53. LLJoint mKneeLeftJoint;
  54. LLJoint mAnkleLeftJoint;
  55. LLJoint mTargetLeft;
  56. LLJoint mHipRightJoint;
  57. LLJoint mKneeRightJoint;
  58. LLJoint mAnkleRightJoint;
  59. LLJoint mTargetRight;
  60. LLCharacter* mCharacter;
  61. LLPointer<LLJointState> mPelvisState;
  62. LLPointer<LLJointState> mHipLeftState;
  63. LLPointer<LLJointState> mKneeLeftState;
  64. LLPointer<LLJointState> mAnkleLeftState;
  65. LLPointer<LLJointState> mHipRightState;
  66. LLPointer<LLJointState> mKneeRightState;
  67. LLPointer<LLJointState> mAnkleRightState;
  68. LLJointSolverRP3 mIKLeft;
  69. LLJointSolverRP3 mIKRight;
  70. LLVector3 mPositionLeft;
  71. LLVector3 mPositionRight;
  72. LLVector3 mNormalLeft;
  73. LLVector3 mNormalRight;
  74. LLQuaternion mRotationLeft;
  75. LLQuaternion mRotationRight;
  76. LLQuaternion mLastGoodPelvisRotation;
  77. LLVector3 mLastGoodPosition;
  78. S32 mFrameNum;
  79. bool mTrackAnkles;
  80. bool mFlipFeet;
  81. };
  82. #endif // LL_LLKEYFRAMESTANDMOTION_H