PageRenderTime 19ms CodeModel.GetById 12ms app.highlight 4ms RepoModel.GetById 1ms 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
 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
27#ifndef LL_LLHUDEFFECTBEAM_H
28#define LL_LLHUDEFFECTBEAM_H
29
30#include "llhudeffect.h"
31
32#include "llframetimer.h"
33
34#include "llinterp.h"
35
36class LLViewerObject;
37
38const S32 NUM_POINTS = 5;
39
40class LLHUDEffectBeam : public LLHUDEffect
41{
42public:
43	/*virtual*/ void setSourceObject(LLViewerObject *objp);
44
45	// A beam can have either a target object or a target position
46	void setTargetObject(LLViewerObject *objp);
47	void setTargetPos(const LLVector3d &target_pos_global);
48
49	friend class LLHUDObject;
50protected:
51	LLHUDEffectBeam(const U8 type);
52	~LLHUDEffectBeam();
53
54	/*virtual*/ void render();
55	/*virtual*/ void renderForTimer();
56	/*virtual*/ void packData(LLMessageSystem *mesgsys);
57	/*virtual*/ void unpackData(LLMessageSystem *mesgsys, S32 blocknum);
58private:
59	void setupParticle(const S32 i);
60
61	
62	F32 mKillTime;
63	LLFrameTimer mTimer;
64	LLInterpLinear<LLVector3d> mInterp[NUM_POINTS];
65	LLInterpLinear<F32> mInterpFade[NUM_POINTS];
66	LLInterpLinear<F32> mFadeInterp;
67	LLVector3d	mTargetPos;
68};
69
70#endif // LL_LLHUDEFFECTBEAM_H