00001
00032 #ifndef LL_LLVIEWERJOINTSHAPE_H
00033 #define LL_LLVIEWERJOINTSHAPE_H
00034
00035 #include "llviewerjoint.h"
00036 #include "llviewerimage.h"
00037
00038
00039
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
00063 LLViewerJointShape();
00064 LLViewerJointShape( ShapeType type, F32 red, F32 green, F32 blue, F32 alpha );
00065
00066
00067 virtual ~LLViewerJointShape();
00068
00069
00070 ShapeType getType();
00071
00072
00073 void setType( ShapeType type );
00074
00075
00076 void getColor( F32 *red, F32 *green, F32 *blue, F32 *alpha );
00077
00078
00079 static void setColorScale( F32 factor ) { sColorScale = factor; }
00080
00081
00082 void setColor( F32 red, F32 green, F32 blue, F32 alpha );
00083
00084
00085 LLViewerImage *getTexture();
00086
00087
00088 void setTexture( LLViewerImage *texture );
00089
00090 virtual void drawBone();
00091 virtual BOOL isTransparent();
00092 BOOL isAnimatable() { return FALSE; }
00093 U32 drawShape( F32 pixelArea, BOOL first_pass );
00094 };
00095
00096 #endif // LL_LLVIEWERJOINTSHAPE_H