00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _SO_TEXTURE_IMAGE3_ELEMENT
00025 #define _SO_TEXTURE_IMAGE3_ELEMENT
00026
00027 #include <Inventor/SbColor.h>
00028 #include <Inventor/elements/SoTextureImageElementBase.h>
00029 #include <Inventor/sys/SoGLType.h>
00030
00031 class SoBufferObject;
00032 class SoGLTexture;
00033
00046 SoEXTENDER_Documented class SoTextureImage3Element : public SoTextureImageElementBase {
00047
00048 SO_ELEMENT_HEADER(SoTextureImage3Element);
00049
00050 public:
00054 static void set(SoState *state, SoNode *node,
00055 const SbVec3s &size, int numComponents,
00056 const unsigned char *bytes,
00057 SoBufferObject* bufferObject,
00058 GLint GLInternalFormat,
00059 int wrapS, int wrapT, int wrapR, int model,
00060 const SbColor &blendColor,float maxAnisotropy,
00061 SbBool enableBorder, const SbVec4f &borderColor);
00062
00067 static const unsigned char *get(SoState *state, SbVec3s &size,
00068 int &numComponents, int &wrapS,
00069 int &wrapT, int &wrapR, int &model,
00070 SbColor &blendColor, int unit=0);
00071
00076 static void set(SoState *state, SoNode *node,
00077 const SbVec3s &subSize, int xoffset, int yoffset, int zoffset,
00078 const unsigned char *bytes, int texname) ;
00083 static const unsigned char *getDefault(SbVec3s &s, int &nc);
00084
00088 static SbBool containsTransparency(SoState *state, int unit=0);
00089
00090 private:
00091
00093 virtual void commonInit();
00094
00096 virtual void init(SoState *state);
00097
00098 private:
00099
00100 static void initClass();
00101 static void exitClass();
00102
00104 static void set(SoState *state, SoNode *node, const SoTexImageData& parameters);
00105
00106 private:
00107
00108 virtual void setElt(const SbVec3s &s, int nc,
00109 const unsigned char *bytes,
00110 SoBufferObject* bufferObject,
00111 GLint GLInternalFormat,
00112 int wrapS, int wrapT, int wrapR, int model,
00113 const SbColor &blendColor, float _maxAnisotropy,
00114 SbBool _enableBorder, const SbVec4f &_borderColor,
00115 int unit=0);
00116
00117 virtual void setSubElt(const SbVec3s &subSize,
00118 int xoffset, int yoffset, int zoffset,
00119 const unsigned char *bytes, int texname,
00120 int unit=0);
00121
00122 virtual ~SoTextureImage3Element();
00123
00124
00125 SoTexImageData& getTexImageData(const int unit) const;
00126 };
00127
00128 #endif
00129
00130
00131