PageRenderTime 28ms CodeModel.GetById 16ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/newview/llhudeffect.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 77 lines | 36 code | 16 blank | 25 comment | 0 complexity | f78699cad8f95aa728edd7304c208057 MD5 | raw file
 1/** 
 2 * @file llhudeffect.h
 3 * @brief LLHUDEffect 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_LLHUDEFFECT_H
28#define LL_LLHUDEFFECT_H
29
30#include "llhudobject.h"
31
32#include "lluuid.h"
33#include "v4coloru.h"
34
35const F32 LL_HUD_DUR_SHORT = 1.f;
36
37class LLMessageSystem;
38
39
40class LLHUDEffect : public LLHUDObject
41{
42public:
43	void setNeedsSendToSim(const BOOL send_to_sim);
44	BOOL getNeedsSendToSim() const;
45	void setOriginatedHere(const BOOL orig_here);
46	BOOL getOriginatedHere() const;
47
48	void setDuration(const F32 duration);
49	void setColor(const LLColor4U &color);
50	void setID(const LLUUID &id);
51	const LLUUID &getID() const;
52
53	BOOL isDead() const;
54
55	friend class LLHUDManager;
56protected:
57	LLHUDEffect(const U8 type);
58	~LLHUDEffect();
59
60	/*virtual*/ void render();
61
62	virtual void packData(LLMessageSystem *mesgsys);
63	virtual void unpackData(LLMessageSystem *mesgsys, S32 blocknum);
64	virtual void update();
65
66	static void getIDType(LLMessageSystem *mesgsys, S32 blocknum, LLUUID &uuid, U8 &type);
67
68protected:
69	LLUUID		mID;
70	F32			mDuration;
71	LLColor4U	mColor;
72
73	BOOL		mNeedsSendToSim;
74	BOOL		mOriginatedHere;
75};
76
77#endif // LL_LLHUDEFFECT_H