llhudeffectpointat.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LLHUDEFFECTPOINTAT_H
00033 #define LL_LLHUDEFFECTPOINTAT_H
00034 
00035 #include "llhudeffect.h"
00036 
00037 class LLViewerObject;
00038 class LLVOAvatar;
00039 
00040 typedef enum e_pointat_type
00041 {
00042         POINTAT_TARGET_NONE,
00043         POINTAT_TARGET_SELECT,
00044         POINTAT_TARGET_GRAB,
00045         POINTAT_TARGET_CLEAR,
00046         POINTAT_NUM_TARGETS
00047 } EPointAtType;
00048 
00049 class LLHUDEffectPointAt : public LLHUDEffect
00050 {
00051 public:
00052         friend class LLHUDObject;
00053 
00054         /*virtual*/ void markDead();
00055         /*virtual*/ void setSourceObject(LLViewerObject* objectp);
00056 
00057         BOOL setPointAt(EPointAtType target_type, LLViewerObject *object, LLVector3 position);
00058         void clearPointAtTarget();
00059 
00060         EPointAtType getPointAtType() { return mTargetType; }
00061         const LLVector3& getPointAtPosAgent() { return mTargetPos; }
00062         const LLVector3d getPointAtPosGlobal();
00063 protected:
00064         LLHUDEffectPointAt(const U8 type);
00065         ~LLHUDEffectPointAt();
00066 
00067         /*virtual*/ void render();
00068         /*virtual*/ void packData(LLMessageSystem *mesgsys);
00069         /*virtual*/ void unpackData(LLMessageSystem *mesgsys, S32 blocknum);
00070 
00071         // lookat behavior has either target position or target object with offset
00072         void setTargetObjectAndOffset(LLViewerObject *objp, LLVector3d offset);
00073         void setTargetPosGlobal(const LLVector3d &target_pos_global);
00074         void calcTargetPosition();
00075         void update();
00076 public:
00077         static BOOL sDebugPointAt;
00078 private:
00079         EPointAtType                            mTargetType;
00080         LLVector3d                                      mTargetOffsetGlobal;
00081         LLVector3                                       mLastSentOffsetGlobal;
00082         F32                                                     mKillTime;
00083         LLFrameTimer                            mTimer;
00084         LLVector3                                       mTargetPos;
00085         F32                                                     mLastSendTime;
00086 };
00087 
00088 #endif // LL_LLHUDEFFECTPOINTAT_H

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