PageRenderTime 42ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/llcharacter/llkeyframefallmotion.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 78 lines | 24 code | 10 blank | 44 comment | 0 complexity | 3fba30aa5481e8f864b41215a22bf663 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llkeyframefallmotion.h
  3. * @brief Implementation of LLKeframeWalkMotion 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_LLKeyframeFallMotion_H
  27. #define LL_LLKeyframeFallMotion_H
  28. //-----------------------------------------------------------------------------
  29. // Header files
  30. //-----------------------------------------------------------------------------
  31. #include "llkeyframemotion.h"
  32. #include "llcharacter.h"
  33. //-----------------------------------------------------------------------------
  34. // class LLKeyframeFallMotion
  35. //-----------------------------------------------------------------------------
  36. class LLKeyframeFallMotion :
  37. public LLKeyframeMotion
  38. {
  39. public:
  40. // Constructor
  41. LLKeyframeFallMotion(const LLUUID &id);
  42. // Destructor
  43. virtual ~LLKeyframeFallMotion();
  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 LLKeyframeFallMotion(id); }
  51. public:
  52. //-------------------------------------------------------------------------
  53. // animation callbacks to be implemented by subclasses
  54. //-------------------------------------------------------------------------
  55. virtual LLMotionInitStatus onInitialize(LLCharacter *character);
  56. virtual BOOL onActivate();
  57. virtual F32 getEaseInDuration();
  58. virtual BOOL onUpdate(F32 activeTime, U8* joint_mask);
  59. protected:
  60. //-------------------------------------------------------------------------
  61. // Member Data
  62. //-------------------------------------------------------------------------
  63. LLCharacter* mCharacter;
  64. F32 mVelocityZ;
  65. LLPointer<LLJointState> mPelvisState;
  66. LLQuaternion mRotationToGroundNormal;
  67. };
  68. #endif // LL_LLKeyframeFallMotion_H