Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoTextureCombiner.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 : VSG (MMM YYYY)
22**=======================================================================*/
23
24#ifndef _SO_TEXTURE_COMBINER_
25#define _SO_TEXTURE_COMBINER_
26
27/* include files */
28#include <Inventor/fields/SoSFEnum.h>
29#include <Inventor/nodes/SoNode.h>
30#include <Inventor/fields/SoSFFloat.h>
31#include <Inventor/fields/SoSFVec4f.h>
32#include <Inventor/sys/SoGLType.h>
33#include <Inventor/SbEnums.h>
34
35/*----------------------------------------------------------------------------*/
36
96class SoTextureCombiner : public SoNode {
97 SO_NODE_HEADER(SoTextureCombiner) ;
98
99
100 public:
101
107 REPLACE = SbEnums::TEX_MODEL_REPLACE,
111 MODULATE = SbEnums::TEX_MODEL_MODULATE,
115 ADD = SbEnums::TEX_MODEL_ADD,
119 ADD_SIGNED = SbEnums::TEX_MODEL_ADD_SIGNED,
123 INTERPOLATE = SbEnums::TEX_MODEL_INTERPOLATE,
127 SUBTRACT = SbEnums::TEX_MODEL_SUBTRACT,
134 DOT3_RGB = SbEnums::TEX_MODEL_DOT3_RGB,
141 DOT3_RGBA = SbEnums::TEX_MODEL_DOT3_RGBA
142 };
143
149 CONSTANT = SbEnums::SRC_PARAM_CONSTANT,
153 PRIMARY_COLOR = SbEnums::SRC_PARAM_PRIMARY_COLOR,
158 PREVIOUS = SbEnums::SRC_PARAM_PREVIOUS,
162 TEXTURE = SbEnums::SRC_PARAM_TEXTURE,
203 };
204
214 SRC_COLOR = SbEnums::SRC_COLOR,
215
220 ONE_MINUS_SRC_COLOR = SbEnums::ONE_MINUS_SRC_COLOR,
221
225 SRC_ALPHA = SbEnums::SRC_ALPHA,
226
230 ONE_MINUS_SRC_ALPHA = SbEnums::ONE_MINUS_SRC_ALPHA
231
232 };
233
261
277
293
324
329
330 private:
331 virtual void doAction(SoAction *action);
332 virtual void callback(SoCallbackAction *action) ;
333 virtual void GLRender(SoGLRenderAction *action) ;
334
335
336 /*----------------------------------------------------------------------------*/
337
338 private:
339 static void initClass();
340 static void exitClass();
341
342 private:
343 // Destructor
344 virtual ~SoTextureCombiner() ;
345} ;
346/*----------------------------------------------------------------------------*/
347
348#endif /* _SO_TEXTURE_COMBINER_ */
349
Abstract base class for all actions.
Definition SoAction.h:132
Performs a generic traversal of a scene graph or path.
Renders a scene graph using Open Inventor's Render Engine.
Abstract base class for all database nodes.
Definition SoNode.h:145
Field containing an enumerated value.
Definition SoSFEnum.h:89
Field containing a floating-point value.
Definition SoSFFloat.h:78
Field containing a homogeneous three-dimensional vector.
Definition SoSFVec4f.h:80
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Texture combiner...
SoSFFloat scaleRGB
Specifies the RGB scale for the entire texture operation and may be 1.0, 2.0, or 4....
OperandRGBA
Specifies the input mapping for the RGB and alpha portions of operand n.
@ SRC_COLOR
(Cred, Cgreen, Cblue).
@ ONE_MINUS_SRC_COLOR
(1 - Cred, 1 - Cgreen, 1 - Cblue).
@ ONE_MINUS_SRC_ALPHA
(1 - Calpha, 1 - Calpha, 1 - Calpha).
@ SRC_ALPHA
(Calpha, Calpha, Calpha).
SoSFEnum operand1RGB
Specifies an operand to be applied on the source1RGB before applying the combiner.
SoSFEnum operand2RGB
Specifies an operand to be applied on the source2RGB before applying the combiner.
SoSFEnum combineRGB
Specifies the texture combiner function to apply on the source<n>RGB transformed by the operand<n>RGB...
SoSFEnum source2Alpha
Specifies one of the three sources for the alpha components.
SoSFEnum operand2Alpha
Specifies an operand to be applied on the source2Alpha before applying the combiner.
SoSFEnum source2RGB
Specifies one of the three sources for the RGB components.
SoSFEnum combineAlpha
Specifies the texture combiner function to apply on the source<n>Alpha transformed by the operand<n>A...
SoSFEnum operand1Alpha
Specifies an operand to be applied on the source1Alpha before applying the combiner.
SoSFVec4f constantColor
Specifies a constant color.
SoSFFloat scaleAlpha
Specifies the alpha scale for the entire texture operation and may be 1.0, 2.0, or 4....
SoSFEnum source0Alpha
Specifies one of the three sources for the alpha components.
SoSFEnum source1RGB
Specifies one of the three sources for the RGB components.
SoSFEnum operand0RGB
Specifies an operand to be applied on the source0RGB before applying the combiner.
SoTextureCombiner()
Constructor.
SoSFEnum source0RGB
Specifies one of the three sources for the RGB components.
SoSFEnum operand0Alpha
Specifies an operand to be applied on the source0Alpha before applying the combiner.
SourceParameter
Source Parameter enumeration values.
@ TEXTURE3
Texture color of texture unit 3.
@ PRIMARY_COLOR
Primary color of the incoming fragment.
@ TEXTURE5
Texture color of texture unit 5.
@ TEXTURE1
Texture color of texture unit 1.
@ PREVIOUS
Result of previous texture combiner.
@ TEXTURE
Texture color of the current texture unit.
@ TEXTURE2
Texture color of texture unit 2.
@ TEXTURE4
Texture color of texture unit 4.
@ TEXTURE0
Texture color of texture unit 0.
@ TEXTURE6
Texture color of texture unit 6.
@ CONSTANT
Texture environment constant color.
@ TEXTURE7
Texture color of texture unit 7.
SoSFEnum source1Alpha
Specifies one of the three sources for the alpha components.
CombineFunction
Texture Combiner Functions.
@ INTERPOLATE
Output fragment is source0 * source2 + source1 * (1 - source2)
@ SUBTRACT
Output fragment is source0 - source1.
@ ADD_SIGNED
Output fragment is source0 + source1 - 0.5.
@ MODULATE
Output fragment is source0 * source1.
@ DOT3_RGBA
Output fragment R = G = B = A = 4*((source0r - 0.5) * (source1r -0.5) + (source0g - 0....
@ ADD
Output fragment is source0 + source1.
@ DOT3_RGB
Output fragment R = G = B = 4*((source0r - 0.5) * (source1r -0.5) + (source0g - 0....
@ REPLACE
Output fragment is source0.