llhudeffectbeam.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LLHUDEFFECTBEAM_H
00033 #define LL_LLHUDEFFECTBEAM_H
00034 
00035 #include "llhudeffect.h"
00036 
00037 #include "llframetimer.h"
00038 
00039 #include "llinterp.h"
00040 
00041 class LLViewerObject;
00042 
00043 const S32 NUM_POINTS = 5;
00044 
00045 class LLHUDEffectBeam : public LLHUDEffect
00046 {
00047 public:
00048         /*virtual*/ void setSourceObject(LLViewerObject *objp);
00049 
00050         // A beam can have either a target object or a target position
00051         void setTargetObject(LLViewerObject *objp);
00052         void setTargetPos(const LLVector3d &target_pos_global);
00053 
00054         friend class LLHUDObject;
00055 protected:
00056         LLHUDEffectBeam(const U8 type);
00057         ~LLHUDEffectBeam();
00058 
00059         /*virtual*/ void render();
00060         /*virtual*/ void packData(LLMessageSystem *mesgsys);
00061         /*virtual*/ void unpackData(LLMessageSystem *mesgsys, S32 blocknum);
00062 private:
00063         void setupParticle(const S32 i);
00064 
00065         
00066         F32 mKillTime;
00067         LLFrameTimer mTimer;
00068         LLInterpLinear<LLVector3d> mInterp[NUM_POINTS];
00069         LLInterpLinear<F32> mInterpFade[NUM_POINTS];
00070         LLInterpLinear<F32> mFadeInterp;
00071         LLVector3d      mTargetPos;
00072 };
00073 
00074 #endif // LL_LLHUDEFFECTBEAM_H

Generated on Thu Jul 1 06:08:42 2010 for Second Life Viewer by  doxygen 1.4.7