PageRenderTime 43ms CodeModel.GetById 11ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/llcharacter/llkeyframestandmotion.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 116 lines | 50 code | 22 blank | 44 comment | 0 complexity | a084fd8a2bc75ae4346945976ca9e83b MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llkeyframestandmotion.h
  3. * @brief Implementation of LLKeyframeStandMotion class.
  4. *
  5. * $LicenseInfo:firstyear=2001&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2010, Linden Research, Inc.
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation;
  12. * version 2.1 of the License only.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. *
  23. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  24. * $/LicenseInfo$
  25. */
  26. #ifndef LL_LLKEYFRAMESTANDMOTION_H
  27. #define LL_LLKEYFRAMESTANDMOTION_H
  28. //-----------------------------------------------------------------------------
  29. // Header files
  30. //-----------------------------------------------------------------------------
  31. #include "llkeyframemotion.h"
  32. #include "lljointsolverrp3.h"
  33. //-----------------------------------------------------------------------------
  34. // class LLKeyframeStandMotion
  35. //-----------------------------------------------------------------------------
  36. class LLKeyframeStandMotion :
  37. public LLKeyframeMotion
  38. {
  39. public:
  40. // Constructor
  41. LLKeyframeStandMotion(const LLUUID &id);
  42. // Destructor
  43. virtual ~LLKeyframeStandMotion();
  44. public:
  45. //-------------------------------------------------------------------------
  46. // functions to support MotionController and MotionRegistry
  47. //-------------------------------------------------------------------------
  48. // static constructor
  49. // all subclasses must implement such a function and register it
  50. static LLMotion *create(const LLUUID &id) { return new LLKeyframeStandMotion(id); }
  51. public:
  52. //-------------------------------------------------------------------------
  53. // animation callbacks to be implemented by subclasses
  54. //-------------------------------------------------------------------------
  55. virtual LLMotionInitStatus onInitialize(LLCharacter *character);
  56. virtual BOOL onActivate();
  57. void onDeactivate();
  58. virtual BOOL onUpdate(F32 time, U8* joint_mask);
  59. public:
  60. //-------------------------------------------------------------------------
  61. // Member Data
  62. //-------------------------------------------------------------------------
  63. LLCharacter *mCharacter;
  64. BOOL mFlipFeet;
  65. LLPointer<LLJointState> mPelvisState;
  66. LLPointer<LLJointState> mHipLeftState;
  67. LLPointer<LLJointState> mKneeLeftState;
  68. LLPointer<LLJointState> mAnkleLeftState;
  69. LLPointer<LLJointState> mHipRightState;
  70. LLPointer<LLJointState> mKneeRightState;
  71. LLPointer<LLJointState> mAnkleRightState;
  72. LLJoint mPelvisJoint;
  73. LLJoint mHipLeftJoint;
  74. LLJoint mKneeLeftJoint;
  75. LLJoint mAnkleLeftJoint;
  76. LLJoint mTargetLeft;
  77. LLJoint mHipRightJoint;
  78. LLJoint mKneeRightJoint;
  79. LLJoint mAnkleRightJoint;
  80. LLJoint mTargetRight;
  81. LLJointSolverRP3 mIKLeft;
  82. LLJointSolverRP3 mIKRight;
  83. LLVector3 mPositionLeft;
  84. LLVector3 mPositionRight;
  85. LLVector3 mNormalLeft;
  86. LLVector3 mNormalRight;
  87. LLQuaternion mRotationLeft;
  88. LLQuaternion mRotationRight;
  89. LLQuaternion mLastGoodPelvisRotation;
  90. LLVector3 mLastGoodPosition;
  91. BOOL mTrackAnkles;
  92. S32 mFrameNum;
  93. };
  94. #endif // LL_LLKEYFRAMESTANDMOTION_H