PageRenderTime 38ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/newview/llhudeffecttrail.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 95 lines | 46 code | 14 blank | 35 comment | 0 complexity | 739b058d249fec10429ffd57e901b322 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llhudeffecttrail.h
  3. * @brief LLHUDEffectSpiral class definition
  4. *
  5. * $LicenseInfo:firstyear=2002&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_LLHUDEFFECTTRAIL_H
  27. #define LL_LLHUDEFFECTTRAIL_H
  28. #include "llhudeffect.h"
  29. #include "llframetimer.h"
  30. #include "llinterp.h"
  31. #include "llviewerpartsim.h"
  32. class LLViewerObject;
  33. const U32 NUM_TRAIL_POINTS = 40;
  34. class LLHUDEffectSpiral : public LLHUDEffect
  35. {
  36. public:
  37. /*virtual*/ void markDead();
  38. /*virtual*/ void setTargetObject(LLViewerObject* objectp);
  39. void setVMag(F32 vmag) { mVMag = vmag; }
  40. void setVOffset(F32 offset) { mVOffset = offset; }
  41. void setInitialRadius(F32 radius) { mInitialRadius = radius; }
  42. void setFinalRadius(F32 radius) { mFinalRadius = radius; }
  43. void setScaleBase(F32 scale) { mScaleBase = scale; }
  44. void setScaleVar(F32 scale) { mScaleVar = scale; }
  45. void setSpinRate(F32 rate) { mSpinRate = rate; }
  46. void setFlickerRate(F32 rate) { mFlickerRate = rate; }
  47. // Start the effect playing locally.
  48. void triggerLocal();
  49. friend class LLHUDObject;
  50. protected:
  51. LLHUDEffectSpiral(const U8 type);
  52. ~LLHUDEffectSpiral();
  53. /*virtual*/ void render();
  54. /*virtual*/ void renderForTimer();
  55. /*virtual*/ void packData(LLMessageSystem *mesgsys);
  56. /*virtual*/ void unpackData(LLMessageSystem *mesgsys, S32 blocknum);
  57. private:
  58. /*
  59. void setupParticle(const S32 i, const F32 start_time);
  60. LLInterpExp<F32> mRadius[NUM_TRAIL_POINTS];
  61. LLInterpLinear<LLVector3d> mDistance[NUM_TRAIL_POINTS];
  62. LLInterpLinear<F32> mScale[NUM_TRAIL_POINTS];
  63. F32 mOffset[NUM_TRAIL_POINTS];
  64. */
  65. BOOL mbInit;
  66. LLPointer<LLViewerPartSource> mPartSourcep;
  67. F32 mKillTime;
  68. F32 mVMag;
  69. F32 mVOffset;
  70. F32 mInitialRadius;
  71. F32 mFinalRadius;
  72. F32 mSpinRate;
  73. F32 mFlickerRate;
  74. F32 mScaleBase;
  75. F32 mScaleVar;
  76. LLFrameTimer mTimer;
  77. LLInterpLinear<F32> mFadeInterp;
  78. };
  79. #endif // LL_LLHUDEFFECTGLOW_H