PageRenderTime 249ms CodeModel.GetById 8ms RepoModel.GetById 8ms app.codeStats 0ms

/indra/newview/llhudeffectbeam.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 70 lines | 31 code | 13 blank | 26 comment | 0 complexity | 428f8afa5735abc65c4c34dfe58fca71 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llhudeffectbeam.h
  3. * @brief LLHUDEffectBeam 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_LLHUDEFFECTBEAM_H
  27. #define LL_LLHUDEFFECTBEAM_H
  28. #include "llhudeffect.h"
  29. #include "llframetimer.h"
  30. #include "llinterp.h"
  31. class LLViewerObject;
  32. const S32 NUM_POINTS = 5;
  33. class LLHUDEffectBeam : public LLHUDEffect
  34. {
  35. public:
  36. /*virtual*/ void setSourceObject(LLViewerObject *objp);
  37. // A beam can have either a target object or a target position
  38. void setTargetObject(LLViewerObject *objp);
  39. void setTargetPos(const LLVector3d &target_pos_global);
  40. friend class LLHUDObject;
  41. protected:
  42. LLHUDEffectBeam(const U8 type);
  43. ~LLHUDEffectBeam();
  44. /*virtual*/ void render();
  45. /*virtual*/ void renderForTimer();
  46. /*virtual*/ void packData(LLMessageSystem *mesgsys);
  47. /*virtual*/ void unpackData(LLMessageSystem *mesgsys, S32 blocknum);
  48. private:
  49. void setupParticle(const S32 i);
  50. F32 mKillTime;
  51. LLFrameTimer mTimer;
  52. LLInterpLinear<LLVector3d> mInterp[NUM_POINTS];
  53. LLInterpLinear<F32> mInterpFade[NUM_POINTS];
  54. LLInterpLinear<F32> mFadeInterp;
  55. LLVector3d mTargetPos;
  56. };
  57. #endif // LL_LLHUDEFFECTBEAM_H