/indra/newview/llvopartgroup.h

https://bitbucket.org/lindenlab/viewer-beta/ · C Header · 97 lines · 55 code · 17 blank · 25 comment · 0 complexity · 762326b6360056e6d8ba2f64ea76bb87 MD5 · raw file

  1. /**
  2. * @file llvopartgroup.h
  3. * @brief Group of particle systems
  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_LLVOPARTGROUP_H
  27. #define LL_LLVOPARTGROUP_H
  28. #include "llviewerobject.h"
  29. #include "v3math.h"
  30. #include "v3color.h"
  31. #include "llframetimer.h"
  32. class LLViewerPartGroup;
  33. class LLVOPartGroup : public LLAlphaObject
  34. {
  35. public:
  36. enum
  37. {
  38. VERTEX_DATA_MASK = (1 << LLVertexBuffer::TYPE_VERTEX) |
  39. (1 << LLVertexBuffer::TYPE_NORMAL) |
  40. (1 << LLVertexBuffer::TYPE_TEXCOORD0) |
  41. (1 << LLVertexBuffer::TYPE_COLOR)
  42. };
  43. LLVOPartGroup(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
  44. /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate.
  45. BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
  46. virtual F32 getBinRadius();
  47. virtual void updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax);
  48. virtual U32 getPartitionType() const;
  49. /*virtual*/ void setPixelAreaAndAngle(LLAgent &agent);
  50. /*virtual*/ void updateTextures();
  51. /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
  52. /*virtual*/ BOOL updateGeometry(LLDrawable *drawable);
  53. void getGeometry(S32 idx,
  54. LLStrider<LLVector4a>& verticesp,
  55. LLStrider<LLVector3>& normalsp,
  56. LLStrider<LLVector2>& texcoordsp,
  57. LLStrider<LLColor4U>& colorsp,
  58. LLStrider<U16>& indicesp);
  59. void updateFaceSize(S32 idx) { }
  60. F32 getPartSize(S32 idx);
  61. void setViewerPartGroup(LLViewerPartGroup *part_groupp) { mViewerPartGroupp = part_groupp; }
  62. LLViewerPartGroup* getViewerPartGroup() { return mViewerPartGroupp; }
  63. protected:
  64. ~LLVOPartGroup();
  65. LLViewerPartGroup *mViewerPartGroupp;
  66. virtual LLVector3 getCameraPosition() const;
  67. };
  68. class LLVOHUDPartGroup : public LLVOPartGroup
  69. {
  70. public:
  71. LLVOHUDPartGroup(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) :
  72. LLVOPartGroup(id, pcode, regionp)
  73. {
  74. }
  75. protected:
  76. LLDrawable* createDrawable(LLPipeline *pipeline);
  77. U32 getPartitionType() const;
  78. virtual LLVector3 getCameraPosition() const;
  79. };
  80. #endif // LL_LLVOPARTGROUP_H