Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoTextureImage3Element.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : Patrick Vigneras (Nov 1999)
22**=======================================================================*/
23
24#ifndef _SO_TEXTURE_IMAGE3_ELEMENT
25#define _SO_TEXTURE_IMAGE3_ELEMENT
26
27#include <Inventor/SbColor.h>
28#include <Inventor/elements/SoTextureImageElementBase.h>
29#include <Inventor/sys/SoGLType.h>
30
31class SoBufferObject;
32class SoGLTexture;
33
46SoEXTENDER_Documented class SoTextureImage3Element : public SoTextureImageElementBase {
47
48 SO_ELEMENT_HEADER(SoTextureImage3Element);
49
50public:
51
56 static const unsigned char *get(SoState *state, SbVec3s &size,
57 int &numComponents, int &wrapS,
58 int &wrapT, int &wrapR, int &model,
59 SbColor &blendColor, int unit=0);
60
65 static void set(SoState *state, SoNode *node,
66 const SbVec3s &subSize, int xoffset, int yoffset, int zoffset,
67 const unsigned char *bytes, int texname) ;
72 static const unsigned char *getDefault(SbVec3s &s, int &nc);
73
77 static SbBool containsTransparency(SoState *state, int unit=0);
78
79private:
80
82 virtual void commonInit();
83
85 virtual void init(SoState *state);
86
87 private:
88 // Initializes the class
89 static void initClass();
90 static void exitClass();
91
93 static void set(SoState *state, SoNode *node, const SoTexImageData& parameters);
94
96 static void set(SoState *state, SoNode *node,
97 const SbVec3s &size, int numComponents,
98 const unsigned char *bytes,
99 SoBufferObject* bufferObject,
100 GLint GLInternalFormat,
101 int wrapS, int wrapT, int wrapR, int model,
102 const SbColor &blendColor,float maxAnisotropy,
103 SbBool enableBorder, const SbVec4f &borderColor);
104
105private:
106
107 virtual void setElt(const SbVec3s &s, int nc,
108 const unsigned char *bytes,
109 SoBufferObject* bufferObject,
110 GLint GLInternalFormat,
111 int wrapS, int wrapT, int wrapR, int model,
112 const SbColor &blendColor, float _maxAnisotropy,
113 SbBool _enableBorder, const SbVec4f &_borderColor,
114 int unit=0);
115
116 virtual void setSubElt(const SbVec3s &subSize,
117 int xoffset, int yoffset, int zoffset,
118 const unsigned char *bytes, int texname,
119 int unit=0);
120
121 virtual ~SoTextureImage3Element();
122};
123
124#endif /* _SO_TEXTURE_IMAGE3_ELEMENT */
125
126
Color vector class.
Definition SbColor.h:82
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> 3D vector class.
Definition SbVec.h:1797
4D vector class.
Definition SbVec.h:2214
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
Abstract base class for all database nodes.
Definition SoNode.h:145
Traversal state.
Definition SoState.h:74
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Stores the curre...
static const unsigned char * getDefault(SbVec3s &s, int &nc)
Returns the default texture image.
static void set(SoState *state, SoNode *node, const SbVec3s &subSize, int xoffset, int yoffset, int zoffset, const unsigned char *bytes, int texname)
Pass texname = -1 to deactivate subtexturing.
static SbBool containsTransparency(SoState *state, int unit=0)
Returns TRUE if the texture contains transparency info.
static const unsigned char * get(SoState *state, SbVec3s &size, int &numComponents, int &wrapS, int &wrapT, int &wrapR, int &model, SbColor &blendColor, int unit=0)
Gets the current image, wrap, and model.
Stores the current texture image.
int SbBool
Boolean type.
Definition SbBase.h:87
int GLint
Definition SoGLType.h:33