Annotation of /trunk/indra/newview/llhudobject.h
Parent Directory
|
Revision Log
Revision 135 - (view) (download)
| 1 : | mjm | 135 | /** |
| 2 : | * @file llhudobject.h | ||
| 3 : | * @brief LLHUDObject class definition | ||
| 4 : | * | ||
| 5 : | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
| 6 : | * | ||
| 7 : | * Copyright (c) 2002-2009, Linden Research, Inc. | ||
| 8 : | * | ||
| 9 : | * Second Life Viewer Source Code | ||
| 10 : | * The source code in this file ("Source Code") is provided by Linden Lab | ||
| 11 : | * to you under the terms of the GNU General Public License, version 2.0 | ||
| 12 : | * ("GPL"), unless you have obtained a separate licensing agreement | ||
| 13 : | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
| 14 : | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
| 15 : | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
| 16 : | * | ||
| 17 : | * There are special exceptions to the terms and conditions of the GPL as | ||
| 18 : | * it is applied to this Source Code. View the full text of the exception | ||
| 19 : | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
| 20 : | * online at | ||
| 21 : | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
| 22 : | * | ||
| 23 : | * By copying, modifying or distributing this software, you acknowledge | ||
| 24 : | * that you have read and understood your obligations described above, | ||
| 25 : | * and agree to abide by those obligations. | ||
| 26 : | * | ||
| 27 : | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
| 28 : | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
| 29 : | * COMPLETENESS OR PERFORMANCE. | ||
| 30 : | * $/LicenseInfo$ | ||
| 31 : | */ | ||
| 32 : | |||
| 33 : | #ifndef LL_LLHUDOBJECT_H | ||
| 34 : | #define LL_LLHUDOBJECT_H | ||
| 35 : | |||
| 36 : | /** | ||
| 37 : | * Base class and manager for in-world 2.5D non-interactive objects | ||
| 38 : | */ | ||
| 39 : | |||
| 40 : | #include "llmemory.h" | ||
| 41 : | |||
| 42 : | #include "v4color.h" | ||
| 43 : | #include "v3math.h" | ||
| 44 : | #include "v3dmath.h" | ||
| 45 : | #include "lldrawpool.h" | ||
| 46 : | #include <list> | ||
| 47 : | |||
| 48 : | class LLViewerCamera; | ||
| 49 : | class LLFontGL; | ||
| 50 : | class LLFace; | ||
| 51 : | class LLViewerObject; | ||
| 52 : | class LLHUDEffect; | ||
| 53 : | |||
| 54 : | class LLHUDObject : public LLRefCount | ||
| 55 : | { | ||
| 56 : | public: | ||
| 57 : | virtual void markDead(); | ||
| 58 : | virtual F32 getDistance() const; | ||
| 59 : | virtual void setSourceObject(LLViewerObject* objectp); | ||
| 60 : | virtual void setTargetObject(LLViewerObject* objectp); | ||
| 61 : | virtual LLViewerObject* getSourceObject() { return mSourceObject; } | ||
| 62 : | virtual LLViewerObject* getTargetObject() { return mTargetObject; } | ||
| 63 : | |||
| 64 : | void setPositionGlobal(const LLVector3d &position_global); | ||
| 65 : | void setPositionAgent(const LLVector3 &position_agent); | ||
| 66 : | |||
| 67 : | BOOL isVisible() const { return mVisible; } | ||
| 68 : | |||
| 69 : | U8 getType() const { return mType; } | ||
| 70 : | |||
| 71 : | LLVector3d getPositionGlobal() const { return mPositionGlobal; } | ||
| 72 : | |||
| 73 : | static LLHUDObject *addHUDObject(const U8 type); | ||
| 74 : | static LLHUDEffect *addHUDEffect(const U8 type); | ||
| 75 : | static void updateAll(); | ||
| 76 : | static void renderAll(); | ||
| 77 : | static void renderAllForSelect(); | ||
| 78 : | |||
| 79 : | static void cleanupHUDObjects(); | ||
| 80 : | |||
| 81 : | enum | ||
| 82 : | { | ||
| 83 : | LL_HUD_TEXT, | ||
| 84 : | LL_HUD_ICON, | ||
| 85 : | LL_HUD_CONNECTOR, | ||
| 86 : | LL_HUD_FLEXIBLE_OBJECT, // Ventrella | ||
| 87 : | LL_HUD_ANIMAL_CONTROLS, // Ventrella | ||
| 88 : | LL_HUD_LOCAL_ANIMATION_OBJECT, // Ventrella | ||
| 89 : | LL_HUD_CLOTH, // Ventrella | ||
| 90 : | LL_HUD_EFFECT_BEAM, | ||
| 91 : | LL_HUD_EFFECT_GLOW, | ||
| 92 : | LL_HUD_EFFECT_POINT, | ||
| 93 : | LL_HUD_EFFECT_TRAIL, | ||
| 94 : | LL_HUD_EFFECT_SPHERE, | ||
| 95 : | LL_HUD_EFFECT_SPIRAL, | ||
| 96 : | LL_HUD_EFFECT_EDIT, | ||
| 97 : | LL_HUD_EFFECT_LOOKAT, | ||
| 98 : | LL_HUD_EFFECT_POINTAT, | ||
| 99 : | LL_HUD_EFFECT_VOICE_VISUALIZER // Ventrella | ||
| 100 : | }; | ||
| 101 : | protected: | ||
| 102 : | static void sortObjects(); | ||
| 103 : | |||
| 104 : | LLHUDObject(const U8 type); | ||
| 105 : | ~LLHUDObject(); | ||
| 106 : | |||
| 107 : | virtual void render() = 0; | ||
| 108 : | virtual void renderForSelect() {}; | ||
| 109 : | |||
| 110 : | protected: | ||
| 111 : | U8 mType; | ||
| 112 : | BOOL mDead; | ||
| 113 : | BOOL mVisible; | ||
| 114 : | LLVector3d mPositionGlobal; | ||
| 115 : | BOOL mOnHUDAttachment; | ||
| 116 : | LLPointer<LLViewerObject> mSourceObject; | ||
| 117 : | LLPointer<LLViewerObject> mTargetObject; | ||
| 118 : | |||
| 119 : | private: | ||
| 120 : | typedef std::list<LLPointer<LLHUDObject> > hud_object_list_t; | ||
| 121 : | static hud_object_list_t sHUDObjects; | ||
| 122 : | }; | ||
| 123 : | |||
| 124 : | #endif // LL_LLHUDOBJECT_H |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |

