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_COMBINER_
00025 #define _SO_TEXTURE_COMBINER_
00026
00027
00028 #include <Inventor/fields/SoSFEnum.h>
00029 #include <Inventor/nodes/SoNode.h>
00030 #include <Inventor/fields/SoSFFloat.h>
00031 #include <Inventor/fields/SoSFVec4f.h>
00032 #include <Inventor/sys/SoGLType.h>
00033 #include <Inventor/SbEnums.h>
00034
00035
00036
00096 class SoTextureCombiner : public SoNode {
00097 SO_NODE_HEADER(SoTextureCombiner) ;
00098
00099
00100 public:
00101
00103 enum CombineFunction {
00107 REPLACE = SbEnums::TEX_MODEL_REPLACE,
00111 MODULATE = SbEnums::TEX_MODEL_MODULATE,
00115 ADD = SbEnums::TEX_MODEL_ADD,
00119 ADD_SIGNED = SbEnums::TEX_MODEL_ADD_SIGNED,
00123 INTERPOLATE = SbEnums::TEX_MODEL_INTERPOLATE,
00127 SUBTRACT = SbEnums::TEX_MODEL_SUBTRACT,
00134 DOT3_RGB = SbEnums::TEX_MODEL_DOT3_RGB,
00141 DOT3_RGBA = SbEnums::TEX_MODEL_DOT3_RGBA
00142 };
00143
00145 enum SourceParameter {
00149 CONSTANT = SbEnums::SRC_PARAM_CONSTANT,
00153 PRIMARY_COLOR = SbEnums::SRC_PARAM_PRIMARY_COLOR,
00158 PREVIOUS = SbEnums::SRC_PARAM_PREVIOUS,
00162 TEXTURE = SbEnums::SRC_PARAM_TEXTURE,
00167 TEXTURE0,
00172 TEXTURE1,
00177 TEXTURE2,
00182 TEXTURE3,
00187 TEXTURE4,
00192 TEXTURE5,
00197 TEXTURE6,
00202 TEXTURE7
00203 };
00204
00209 enum OperandRGBA{
00214 SRC_COLOR = SbEnums::SRC_COLOR,
00215
00220 ONE_MINUS_SRC_COLOR = SbEnums::ONE_MINUS_SRC_COLOR,
00221
00225 SRC_ALPHA = SbEnums::SRC_ALPHA,
00226
00230 ONE_MINUS_SRC_ALPHA = SbEnums::ONE_MINUS_SRC_ALPHA
00231
00232 };
00233
00239 SoSFEnum combineRGB;
00245 SoSFEnum combineAlpha;
00250 SoSFEnum source0RGB;
00255 SoSFEnum source1RGB;
00260 SoSFEnum source2RGB;
00261
00266 SoSFEnum source0Alpha;
00271 SoSFEnum source1Alpha;
00276 SoSFEnum source2Alpha;
00277
00282 SoSFEnum operand0RGB;
00287 SoSFEnum operand1RGB;
00292 SoSFEnum operand2RGB;
00293
00299 SoSFEnum operand0Alpha;
00305 SoSFEnum operand1Alpha;
00311 SoSFEnum operand2Alpha;
00315 SoSFFloat scaleRGB;
00319 SoSFFloat scaleAlpha;
00323 SoSFVec4f constantColor;
00324
00328 SoTextureCombiner() ;
00329
00330 private:
00331 virtual void doAction(SoAction *action);
00332 virtual void callback(SoCallbackAction *action) ;
00333 virtual void GLRender(SoGLRenderAction *action) ;
00334
00335
00336
00337
00338 private:
00339 static void initClass();
00340 static void exitClass();
00341
00342 private:
00343
00344 virtual ~SoTextureCombiner() ;
00345 } ;
00346
00347
00348 #endif
00349
00350