llviewerjointshape.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LLVIEWERJOINTSHAPE_H
00033 #define LL_LLVIEWERJOINTSHAPE_H
00034 
00035 #include "llviewerjoint.h"
00036 #include "llviewerimage.h"
00037 
00038 //-----------------------------------------------------------------------------
00039 // class LLViewerJointShape
00040 //-----------------------------------------------------------------------------
00041 class LLViewerJointShape :
00042         public LLViewerJoint
00043 {
00044 public:
00045         enum ShapeType
00046         {
00047                 ST_NULL,
00048                 ST_CUBE,
00049                 ST_SPHERE,
00050                 ST_CYLINDER
00051         };
00052 
00053 protected:
00054         ShapeType               mType;
00055         LLColor4                mColor;
00056         LLPointer<LLViewerImage> mTexture;
00057 
00058         static F32              sColorScale;
00059 
00060 public:
00061 
00062         // Constructor
00063         LLViewerJointShape();
00064         LLViewerJointShape( ShapeType type, F32 red, F32 green, F32 blue, F32 alpha );
00065 
00066         // Destructor
00067         virtual ~LLViewerJointShape();
00068 
00069         // Gets the shape type
00070         ShapeType getType();
00071 
00072         // Sets the shape type
00073         void setType( ShapeType type );
00074 
00075         // Gets the shape color
00076         void getColor( F32 *red, F32 *green, F32 *blue, F32 *alpha );
00077 
00078         // Sets the color scale factor applied to all subsequent setColor() calls.
00079         static void setColorScale( F32 factor ) { sColorScale = factor; }
00080 
00081         // Sets the shape color
00082         void setColor( F32 red, F32 green, F32 blue, F32 alpha );
00083 
00084         // Gets the shape texture
00085         LLViewerImage *getTexture();
00086 
00087         // Sets the shape texture
00088         void setTexture( LLViewerImage *texture );
00089 
00090         virtual void drawBone();
00091         virtual BOOL isTransparent();
00092         /*virutal*/ BOOL isAnimatable() { return FALSE; }
00093         /*virtual*/ U32 drawShape( F32 pixelArea, BOOL first_pass );
00094 };
00095 
00096 #endif // LL_LLVIEWERJOINTSHAPE_H

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