diff options
author | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
commit | 38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch) | |
tree | adca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/newview/llhudobject.h | |
parent | README.txt (diff) | |
download | meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.zip meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.gz meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.bz2 meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.xz |
Second Life viewer sources 1.13.2.12
Diffstat (limited to 'linden/indra/newview/llhudobject.h')
-rw-r--r-- | linden/indra/newview/llhudobject.h | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/linden/indra/newview/llhudobject.h b/linden/indra/newview/llhudobject.h new file mode 100644 index 0000000..d5494ac --- /dev/null +++ b/linden/indra/newview/llhudobject.h | |||
@@ -0,0 +1,115 @@ | |||
1 | /** | ||
2 | * @file llhudobject.h | ||
3 | * @brief LLHUDObject class definition | ||
4 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | ||
6 | * | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
8 | * to you under the terms of the GNU General Public License, version 2.0 | ||
9 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
10 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
11 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
12 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
13 | * | ||
14 | * There are special exceptions to the terms and conditions of the GPL as | ||
15 | * it is applied to this Source Code. View the full text of the exception | ||
16 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
17 | * online at http://secondlife.com/developers/opensource/flossexception | ||
18 | * | ||
19 | * By copying, modifying or distributing this software, you acknowledge | ||
20 | * that you have read and understood your obligations described above, | ||
21 | * and agree to abide by those obligations. | ||
22 | * | ||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
25 | * COMPLETENESS OR PERFORMANCE. | ||
26 | */ | ||
27 | |||
28 | #ifndef LL_LLHUDOBJECT_H | ||
29 | #define LL_LLHUDOBJECT_H | ||
30 | |||
31 | /** | ||
32 | * Base class and manager for in-world 2.5D non-interactive objects | ||
33 | */ | ||
34 | |||
35 | #include "llmemory.h" | ||
36 | |||
37 | #include "v4color.h" | ||
38 | #include "v3math.h" | ||
39 | #include "v3dmath.h" | ||
40 | #include "linked_lists.h" | ||
41 | #include "lldrawpool.h" | ||
42 | #include <list> | ||
43 | |||
44 | class LLViewerCamera; | ||
45 | class LLFontGL; | ||
46 | class LLFace; | ||
47 | class LLViewerObject; | ||
48 | |||
49 | class LLHUDObject : public LLRefCount | ||
50 | { | ||
51 | public: | ||
52 | virtual void markDead(); | ||
53 | virtual F32 getDistance() const; | ||
54 | virtual void setSourceObject(LLViewerObject* objectp); | ||
55 | virtual void setTargetObject(LLViewerObject* objectp); | ||
56 | virtual LLViewerObject* getSourceObject() { return mSourceObject; } | ||
57 | virtual LLViewerObject* getTargetObject() { return mTargetObject; } | ||
58 | |||
59 | void setPositionGlobal(const LLVector3d &position_global); | ||
60 | void setPositionAgent(const LLVector3 &position_agent); | ||
61 | |||
62 | BOOL isVisible() const { return mVisible; } | ||
63 | |||
64 | U8 getType() const { return mType; } | ||
65 | |||
66 | static LLHUDObject *addHUDObject(const U8 type); | ||
67 | static void updateAll(); | ||
68 | static void renderAll(); | ||
69 | static void renderAllForSelect(); | ||
70 | |||
71 | static void cleanupHUDObjects(); | ||
72 | |||
73 | enum | ||
74 | { | ||
75 | LL_HUD_TEXT, | ||
76 | LL_HUD_ICON, | ||
77 | LL_HUD_CONNECTOR, | ||
78 | LL_HUD_FLEXIBLE_OBJECT, // Ventrella | ||
79 | LL_HUD_ANIMAL_CONTROLS, // Ventrella | ||
80 | LL_HUD_LOCAL_ANIMATION_OBJECT, // Ventrella | ||
81 | LL_HUD_CLOTH, // Ventrella | ||
82 | LL_HUD_EFFECT_BEAM, | ||
83 | LL_HUD_EFFECT_GLOW, | ||
84 | LL_HUD_EFFECT_POINT, | ||
85 | LL_HUD_EFFECT_TRAIL, | ||
86 | LL_HUD_EFFECT_SPHERE, | ||
87 | LL_HUD_EFFECT_SPIRAL, | ||
88 | LL_HUD_EFFECT_EDIT, | ||
89 | LL_HUD_EFFECT_LOOKAT, | ||
90 | LL_HUD_EFFECT_POINTAT | ||
91 | }; | ||
92 | protected: | ||
93 | static void sortObjects(); | ||
94 | |||
95 | LLHUDObject(const U8 type); | ||
96 | virtual ~LLHUDObject(); | ||
97 | |||
98 | virtual void render() = 0; | ||
99 | virtual void renderForSelect() {}; | ||
100 | |||
101 | protected: | ||
102 | U8 mType; | ||
103 | BOOL mDead; | ||
104 | BOOL mVisible; | ||
105 | LLVector3d mPositionGlobal; | ||
106 | BOOL mOnHUDAttachment; | ||
107 | LLPointer<LLViewerObject> mSourceObject; | ||
108 | LLPointer<LLViewerObject> mTargetObject; | ||
109 | |||
110 | private: | ||
111 | typedef std::list<LLPointer<LLHUDObject> > hud_object_list_t; | ||
112 | static hud_object_list_t sHUDObjects; | ||
113 | }; | ||
114 | |||
115 | #endif // LL_LLHUDOBJECT_H | ||