1#ifndef COIN_SOMULTITEXTUREIMAGEELEMENT_H
2#define COIN_SOMULTITEXTUREIMAGEELEMENT_H
36#include <Inventor/elements/SoReplacedElement.h>
37#include <Inventor/SbVec2s.h>
38#include <Inventor/SbVec3s.h>
39#include <Inventor/SbColor.h>
42class SoMultiTextureImageElementP;
44class COIN_DLL_API SoMultiTextureImageElement :
public SoElement {
47 SO_ELEMENT_HEADER(SoMultiTextureImageElement);
51 virtual ~SoMultiTextureImageElement();
71 CLAMP_TO_BORDER = 0x812D
74 virtual void init(SoState * state);
75 static void setDefault(SoState *
const state,
SoNode *
const node,
const int unit = 0);
77 static void set(SoState *
const state,
SoNode *
const node,
79 const SbVec2s & size,
const int numComponents,
80 const unsigned char * bytes,
83 const Model model,
const SbColor & blendColor);
84 static void set(SoState *
const state,
SoNode *
const node,
86 const SbVec3s & size,
const int numComponents,
87 const unsigned char * bytes,
91 const Model model,
const SbColor & blendColor);
93 static const unsigned char *
get(SoState *
const state,
101 static const unsigned char *
get(SoState *
const state,
111 static const unsigned char *
getImage(SoState *
const state,
114 int & numComponents);
115 static const unsigned char *
getImage(SoState *
const state,
121 static Model
getModel(SoState *
const state,
const int unit = 0);
122 static Wrap
getWrapS(SoState *
const state,
const int unit = 0);
123 static Wrap
getWrapT(SoState *
const state,
const int unit = 0);
124 static Wrap
getWrapR(SoState *
const state,
const int unit = 0);
131 virtual void push(SoState * state);
135 virtual void setElt(
const int unit,
136 const SbUniqueId nodeid,
137 const SbVec2s & size,
const int numComponents,
138 const unsigned char * bytes,
143 virtual void setElt(
const int unit,
144 const SbUniqueId nodeid,
145 const SbVec3s & size,
const int numComponents,
146 const unsigned char * bytes,
158 UnitData(
const UnitData & org);
162 const unsigned char * bytes;
163 Wrap wrapS, wrapT, wrapR;
169 const UnitData & getUnitData(
const int unit)
const;
173 SoMultiTextureImageElementP * pimpl;
176 static void set(SoState *
const state,
SoNode *
const node,
177 const SbVec2s & size,
const int numComponents,
178 const unsigned char * bytes,
179 const int wrapS,
const int wrapT,
180 const int model,
const SbColor & blendColor) {
181 set(state, node,0, size, numComponents, bytes,
182 (Wrap) wrapS, (Wrap) wrapT, (Model) model, blendColor);
185 const SbVec2s & size,
const int numComponents,
186 const unsigned char * bytes,
187 const Wrap wrapS,
const Wrap wrapT,
188 const Model model,
const SbColor & blendColor) {
189 set(state, node, 0, size, numComponents, bytes,
190 wrapS, wrapT, model, blendColor);
193 static void set(SoState *
const state, SoNode *
const node,
194 const SbVec3s & size,
const int numComponents,
195 const unsigned char * bytes,
196 const int wrapS,
const int wrapT,
const int wrapR,
197 const int model,
const SbColor & blendColor) {
198 set(state, node, 0, size, numComponents, bytes,
199 (Wrap) wrapS, (Wrap) wrapT, (Wrap) wrapR, (Model) model, blendColor);
202 static void set(SoState *
const state, SoNode *
const node,
203 const SbVec3s & size,
const int numComponents,
204 const unsigned char * bytes,
205 const Wrap wrapS,
const Wrap wrapT,
const Wrap wrapR,
206 const Model model,
const SbColor & blendColor) {
207 set(state, node, 0, size, numComponents, bytes,
208 wrapS, wrapT, wrapR, model, blendColor);
211 static const unsigned char *
get(SoState *
const state,
217 SbColor & blendColor) {
218 return get(state, 0, size, numComponents, wrapS, wrapT, model, blendColor);
220 static const unsigned char *
get(SoState *
const state,
227 SbColor & blendColor) {
228 return get(state, 0, size, numComponents, wrapS, wrapT, wrapR, model, blendColor);
231 static const unsigned char *
get(SoState *
const state,
237 SbColor & blendColor) {
240 const unsigned char * bytes =
get(state, 0, size, numComponents, s, t, m, blendColor);
246 static const unsigned char *
get(SoState *
const state,
253 SbColor & blendColor) {
256 const unsigned char * bytes =
get(state, 0, size, numComponents, s, t, r, m, blendColor);
263 static const unsigned char *getImage(SoState *
const state,
265 int &numComponents) {
266 return getImage(state, 0, size, numComponents);
268 static const unsigned char *getImage(SoState *
const state,
270 int &numComponents) {
271 return getImage(state, 0, size, numComponents);
The SbColor class contains the red, green and blue components which make up a color value.
Definition SbColor.h:39
The SbVec2s class is a 2 dimensional vector with short integer coordinates.
Definition SbVec2s.h:51
The SbVec3s class is a 3 dimensional vector with short integer coordinates.
Definition SbVec3s.h:51
SoElement(void)
Definition SoElement.cpp:534
virtual SbBool matches(const SoElement *element) const =0
Definition SoElement.cpp:609
static void initClass(void)
Definition SoElement.cpp:507
virtual SoElement * copyMatchInfo(void) const =0
virtual void init(SoState *state)
Definition SoElement.cpp:553
virtual void push(SoState *state)
Definition SoElement.cpp:570
Definition SoMultiTextureImageElement.h:155
static Wrap getWrapT(SoState *const state, const int unit=0)
Definition SoMultiTextureImageElement.cpp:462
static const unsigned char * getDefault(SbVec2s &size, int &numComponents)
FIXME: write doc.
Definition SoMultiTextureImageElement.cpp:320
static SbBool containsTransparency(SoState *const state)
FIXME: write doc.
Definition SoMultiTextureImageElement.cpp:271
virtual void setElt(const int unit, const SbUniqueId nodeid, const SbVec2s &size, const int numComponents, const unsigned char *bytes, const Wrap wrapS, const Wrap wrapT, const Model model, const SbColor &blendColor)
FIXME: write doc.
Definition SoMultiTextureImageElement.cpp:379
static const unsigned char * getImage(SoState *const state, const int unit, SbVec2s &size, int &numComponents)
Definition SoMultiTextureImageElement.cpp:229
static Wrap getWrapS(SoState *const state, const int unit=0)
Definition SoMultiTextureImageElement.cpp:448
static Wrap getWrapR(SoState *const state, const int unit=0)
Definition SoMultiTextureImageElement.cpp:476
static void setDefault(SoState *const state, SoNode *const node, const int unit=0)
Definition SoMultiTextureImageElement.cpp:112
static Model getModel(SoState *const state, const int unit=0)
Definition SoMultiTextureImageElement.cpp:490
static const SbColor & getBlendColor(SoState *const state, const int unit=0)
Definition SoMultiTextureImageElement.cpp:434
static void set(SoState *const state, SoNode *const node, const int unit, const SbVec2s &size, const int numComponents, const unsigned char *bytes, const Wrap wrapS, const Wrap wrapT, const Model model, const SbColor &blendColor)
FIXME: write doc.
Definition SoMultiTextureImageElement.cpp:123
virtual SbBool hasTransparency(const int unit=0) const
Definition SoMultiTextureImageElement.cpp:292
static const unsigned char * get(SoState *const state, const int unit, SbVec2s &size, int &numComponents, Wrap &wrapS, Wrap &wrapT, Model &model, SbColor &blendColor)
FIXME: write doc.
Definition SoMultiTextureImageElement.cpp:168
int getNumUnits() const
Definition SoMultiTextureImageElement.cpp:312
The SoNode class is the base class for nodes used in scene graphs.
Definition SoNode.h:56
The SoState class manages the Coin scene graph traversal state data.
Definition SoState.h:44
SbByteBuffer get(const char *resloc)
Definition CoinResources.cpp:178
SbBool set(const char *resloc, const SbByteBuffer &buffer, ResourceFlags flags=NONE)
Definition CoinResources.cpp:294