llhudobject.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LLHUDOBJECT_H
00033 #define LL_LLHUDOBJECT_H
00034 
00039 #include "llmemory.h"
00040 
00041 #include "v4color.h"
00042 #include "v3math.h"
00043 #include "v3dmath.h"
00044 #include "linked_lists.h"
00045 #include "lldrawpool.h"
00046 #include <list>
00047 
00048 class LLViewerCamera;
00049 class LLFontGL;
00050 class LLFace;
00051 class LLViewerObject;
00052 class LLHUDEffect;
00053 
00054 class LLHUDObject : public LLRefCount
00055 {
00056 public:
00057         virtual void markDead();
00058         virtual F32 getDistance() const;
00059         virtual void setSourceObject(LLViewerObject* objectp);
00060         virtual void setTargetObject(LLViewerObject* objectp);
00061         virtual LLViewerObject* getSourceObject() { return mSourceObject; }
00062         virtual LLViewerObject* getTargetObject() { return mTargetObject; }
00063 
00064         void setPositionGlobal(const LLVector3d &position_global);
00065         void setPositionAgent(const LLVector3 &position_agent);
00066 
00067         BOOL isVisible() const { return mVisible; }
00068 
00069         U8 getType() const { return mType; }
00070 
00071         static LLHUDObject *addHUDObject(const U8 type);
00072         static LLHUDEffect *addHUDEffect(const U8 type);
00073         static void updateAll();
00074         static void renderAll();
00075         static void renderAllForSelect();
00076 
00077         static void cleanupHUDObjects();
00078 
00079         enum
00080         {
00081                 LL_HUD_TEXT,
00082                 LL_HUD_ICON,
00083                 LL_HUD_CONNECTOR,
00084                 LL_HUD_FLEXIBLE_OBJECT,                 // Ventrella
00085                 LL_HUD_ANIMAL_CONTROLS,                 // Ventrella
00086                 LL_HUD_LOCAL_ANIMATION_OBJECT,  // Ventrella
00087                 LL_HUD_CLOTH,                                   // Ventrella
00088                 LL_HUD_EFFECT_BEAM,
00089                 LL_HUD_EFFECT_GLOW,
00090                 LL_HUD_EFFECT_POINT,
00091                 LL_HUD_EFFECT_TRAIL,
00092                 LL_HUD_EFFECT_SPHERE,
00093                 LL_HUD_EFFECT_SPIRAL,
00094                 LL_HUD_EFFECT_EDIT,
00095                 LL_HUD_EFFECT_LOOKAT,
00096                 LL_HUD_EFFECT_POINTAT,
00097                 LL_HUD_EFFECT_VOICE_VISUALIZER  // Ventrella
00098         };
00099 protected:
00100         static void sortObjects();
00101 
00102         LLHUDObject(const U8 type);
00103         ~LLHUDObject();
00104 
00105         virtual void render() = 0;
00106         virtual void renderForSelect() {};
00107         
00108 protected:
00109         U8                              mType;
00110         BOOL                    mDead;
00111         BOOL                    mVisible;
00112         LLVector3d              mPositionGlobal;
00113         BOOL                    mOnHUDAttachment;
00114         LLPointer<LLViewerObject> mSourceObject;
00115         LLPointer<LLViewerObject> mTargetObject;
00116 
00117 private:
00118         typedef std::list<LLPointer<LLHUDObject> > hud_object_list_t;
00119         static hud_object_list_t sHUDObjects;
00120 };
00121 
00122 #endif // LL_LLHUDOBJECT_H

Generated on Thu Jul 1 06:08:42 2010 for Second Life Viewer by  doxygen 1.4.7