PageRenderTime 394ms CodeModel.GetById 211ms app.highlight 6ms RepoModel.GetById 175ms 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
 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
27#ifndef LL_LLHUDEFFECTTRAIL_H
28#define LL_LLHUDEFFECTTRAIL_H
29
30#include "llhudeffect.h"
31
32#include "llframetimer.h"
33
34#include "llinterp.h"
35#include "llviewerpartsim.h"
36
37class LLViewerObject;
38
39const U32 NUM_TRAIL_POINTS = 40;
40
41
42class LLHUDEffectSpiral : public LLHUDEffect
43{
44public:
45	/*virtual*/ void markDead();
46	/*virtual*/ void setTargetObject(LLViewerObject* objectp);
47	void setVMag(F32 vmag) { mVMag = vmag; }
48	void setVOffset(F32 offset) { mVOffset = offset; }
49	void setInitialRadius(F32 radius) { mInitialRadius = radius; }
50	void setFinalRadius(F32 radius) { mFinalRadius = radius; }
51	void setScaleBase(F32 scale) { mScaleBase = scale; }
52	void setScaleVar(F32 scale) { mScaleVar = scale; }
53	void setSpinRate(F32 rate) { mSpinRate = rate; }
54	void setFlickerRate(F32 rate) { mFlickerRate = rate; }
55
56	// Start the effect playing locally.
57	void triggerLocal();
58
59	friend class LLHUDObject;
60protected:
61	LLHUDEffectSpiral(const U8 type);
62	~LLHUDEffectSpiral();
63
64	/*virtual*/ void render();
65	/*virtual*/ void renderForTimer();
66	/*virtual*/ void packData(LLMessageSystem *mesgsys);
67	/*virtual*/ void unpackData(LLMessageSystem *mesgsys, S32 blocknum);
68private:
69	/*
70	void setupParticle(const S32 i, const F32 start_time);
71
72	
73	LLInterpExp<F32>				mRadius[NUM_TRAIL_POINTS];
74	LLInterpLinear<LLVector3d>		mDistance[NUM_TRAIL_POINTS];
75	LLInterpLinear<F32>				mScale[NUM_TRAIL_POINTS];
76	F32								mOffset[NUM_TRAIL_POINTS];
77	*/
78
79	BOOL							mbInit;
80	LLPointer<LLViewerPartSource>	mPartSourcep;
81
82	F32								mKillTime;
83	F32								mVMag;
84	F32								mVOffset;
85	F32								mInitialRadius;
86	F32								mFinalRadius;
87	F32								mSpinRate;
88	F32								mFlickerRate;
89	F32								mScaleBase;
90	F32								mScaleVar;
91	LLFrameTimer					mTimer;
92	LLInterpLinear<F32>				mFadeInterp;
93};
94
95#endif // LL_LLHUDEFFECTGLOW_H