llsprite.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LLSPRITE_H
00033 #define LL_LLSPRITE_H
00034 
00036 //#include "llmath.h"
00037 #include "v3math.h"
00038 #include "v4math.h"
00039 #include "v4color.h"
00040 #include "lluuid.h"
00041 #include "llgl.h"
00042 #include "llviewerimage.h"
00043 
00044 class LLViewerCamera;
00045 
00046 class LLFace;
00047 
00048 class LLSprite  
00049 {
00050 public:
00051         LLSprite(const LLUUID &image_uuid);
00052         LLSprite(const LLUUID &image_uuid, const F32 width, const F32 height, const BOOL b_usemipmap = TRUE);
00053         ~LLSprite();
00054 
00055         void render(LLViewerCamera * camerap);
00056 
00057         F32 getWidth()                          const   { return mWidth; } 
00058         F32 getHeight()                         const   { return mHeight; }
00059         F32 getYaw()                            const   { return mYaw; } 
00060         F32 getPitch()                          const   { return mPitch; }
00061         F32     getAlpha()                              const   { return mColor.mV[VALPHA]; }
00062 
00063         LLVector3 getPosition()         const   { return mPosition; }
00064         LLColor4  getColor()            const   { return mColor; }
00065 
00066         void setPosition(const LLVector3 &position);
00067         void setPitch(const F32 pitch);
00068         void setSize(const F32 width, const F32 height);
00069         void setYaw(const F32 yaw);
00070         void setFollow(const BOOL follow);
00071         void setUseCameraUp(const BOOL use_up);
00072 
00073         void setTexMode(LLGLenum mode);
00074         void setColor(const LLColor4 &color);
00075         void setColor(const F32 r, const F32 g, const F32 b, const F32 a);
00076         void setAlpha(const F32 alpha)                                  { mColor.mV[VALPHA] = alpha; }
00077         void setNormal(const LLVector3 &normal)         { sNormal = normal; sNormal.normVec();}
00078 
00079         F32 getAlpha();
00080 
00081         void updateFace(LLFace &face);
00082 
00083 public:
00084         LLUUID mImageID;
00085         LLPointer<LLViewerImage> mImagep;
00086 private:
00087         F32 mWidth;
00088         F32 mHeight;
00089         F32 mWidthDiv2;
00090         F32 mHeightDiv2;
00091         F32 mPitch;
00092         F32 mYaw;
00093         LLVector3 mPosition;
00094         BOOL mFollow;
00095         BOOL mUseCameraUp;
00096 
00097         LLColor4 mColor;
00098         LLGLenum mTexMode;
00099 
00100         // put 
00101         LLVector3 mScaledUp;
00102         LLVector3 mScaledRight;
00103         static LLVector3 sCameraUp;
00104         static LLVector3 sCameraRight;
00105         static LLVector3 sCameraPosition;
00106         static LLVector3 sNormal;
00107         LLVector3 mA,mB,mC,mD;   // the four corners of a quad
00108 
00109 };
00110 
00111 #endif
00112 

Generated on Thu Jul 1 06:09:12 2010 for Second Life Viewer by  doxygen 1.4.7