PageRenderTime 36ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/newview/lltexglobalcolor.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 83 lines | 44 code | 12 blank | 27 comment | 0 complexity | 7568707f8d39ba6150ef5592c6d0522c MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file lltexglobalcolor.h
  3. * @brief This is global texture color info used by llvoavatar.
  4. *
  5. * $LicenseInfo:firstyear=2008&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_LLTEXGLOBALCOLOR_H
  27. #define LL_LLTEXGLOBALCOLOR_H
  28. #include "lltexlayer.h"
  29. #include "lltexlayerparams.h"
  30. class LLVOAvatar;
  31. class LLWearable;
  32. class LLTexGlobalColorInfo;
  33. class LLTexGlobalColor
  34. {
  35. public:
  36. LLTexGlobalColor( LLVOAvatar* avatar );
  37. ~LLTexGlobalColor();
  38. LLTexGlobalColorInfo* getInfo() const { return mInfo; }
  39. // This sets mInfo and calls initialization functions
  40. BOOL setInfo(LLTexGlobalColorInfo *info);
  41. LLVOAvatar* getAvatar() const { return mAvatar; }
  42. LLColor4 getColor() const;
  43. const std::string& getName() const;
  44. private:
  45. param_color_list_t mParamGlobalColorList;
  46. LLVOAvatar* mAvatar; // just backlink, don't LLPointer
  47. LLTexGlobalColorInfo *mInfo;
  48. };
  49. // Used by llvoavatar to determine skin/eye/hair color.
  50. class LLTexGlobalColorInfo
  51. {
  52. friend class LLTexGlobalColor;
  53. public:
  54. LLTexGlobalColorInfo();
  55. ~LLTexGlobalColorInfo();
  56. BOOL parseXml(LLXmlTreeNode* node);
  57. private:
  58. param_color_info_list_t mParamColorInfoList;
  59. std::string mName;
  60. };
  61. class LLTexParamGlobalColor : public LLTexLayerParamColor
  62. {
  63. public:
  64. LLTexParamGlobalColor(LLTexGlobalColor *tex_color);
  65. /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const;
  66. protected:
  67. /*virtual*/ void onGlobalColorChanged(bool upload_bake);
  68. private:
  69. LLTexGlobalColor* mTexGlobalColor;
  70. };
  71. #endif