summaryrefslogtreecommitdiff
path: root/indra/newview/llhudeffectbeam.h
blob: 9cb28ac1dc94a7500d2284e1acc6223177e7ea14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/** 
 * @file llhudeffectbeam.h
 * @brief LLHUDEffectBeam class definition
 *
 * Copyright (c) 2002-$CurrentYear$, Linden Research, Inc.
 * $License$
 */

#ifndef LL_LLHUDEFFECTBEAM_H
#define LL_LLHUDEFFECTBEAM_H

#include "llhudeffect.h"

#include "llframetimer.h"

#include "llinterp.h"

class LLViewerObject;

const S32 NUM_POINTS = 5;

class LLHUDEffectBeam : public LLHUDEffect
{
public:
	/*virtual*/ void setSourceObject(LLViewerObject *objp);

	// A beam can have either a target object or a target position
	void setTargetObject(LLViewerObject *objp);
	void setTargetPos(const LLVector3d &target_pos_global);

	friend class LLHUDObject;
protected:
	LLHUDEffectBeam(const U8 type);
	~LLHUDEffectBeam();

	/*virtual*/ void render();
	/*virtual*/ void packData(LLMessageSystem *mesgsys);
	/*virtual*/ void unpackData(LLMessageSystem *mesgsys, S32 blocknum);
private:
	void setupParticle(const S32 i);

	
	F32 mKillTime;
	LLFrameTimer mTimer;
	LLInterpLinear<LLVector3d> mInterp[NUM_POINTS];
	LLInterpLinear<F32> mInterpFade[NUM_POINTS];
	LLInterpLinear<F32> mFadeInterp;
	LLVector3d	mTargetPos;
};

#endif // LL_LLHUDEFFECTBEAM_H