/indra/llprimitive/lltextureanim.h

https://bitbucket.org/lindenlab/viewer-beta/ · C++ Header · 72 lines · 40 code · 7 blank · 25 comment · 0 complexity · f9800107832f8a3e8200f5265769ce58 MD5 · raw file

  1. /**
  2. * @file lltextureanim.h
  3. * @brief LLTextureAnim base 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_LLTEXTUREANIM_H
  27. #define LL_LLTEXTUREANIM_H
  28. #include "stdtypes.h"
  29. #include "llsd.h"
  30. class LLMessageSystem;
  31. class LLDataPacker;
  32. class LLTextureAnim
  33. {
  34. public:
  35. LLTextureAnim();
  36. virtual ~LLTextureAnim();
  37. virtual void reset();
  38. void packTAMessage(LLMessageSystem *mesgsys) const;
  39. void packTAMessage(LLDataPacker &dp) const;
  40. void unpackTAMessage(LLMessageSystem *mesgsys, const S32 block_num);
  41. void unpackTAMessage(LLDataPacker &dp);
  42. BOOL equals(const LLTextureAnim &other) const;
  43. LLSD asLLSD() const;
  44. operator LLSD() const { return asLLSD(); }
  45. bool fromLLSD(LLSD& sd);
  46. enum
  47. {
  48. ON = 0x01,
  49. LOOP = 0x02,
  50. REVERSE = 0x04,
  51. PING_PONG = 0x08,
  52. SMOOTH = 0x10,
  53. ROTATE = 0x20,
  54. SCALE = 0x40,
  55. };
  56. public:
  57. U8 mMode;
  58. S8 mFace;
  59. U8 mSizeX;
  60. U8 mSizeY;
  61. F32 mStart;
  62. F32 mLength;
  63. F32 mRate; // Rate in frames per second.
  64. };
  65. #endif