Open Inventor Release 2024.1.0
 
Loading...
Searching...
No Matches
SoTextureCombiner Class Reference

VSG extension Texture combiner node. More...

#include <Inventor/nodes/SoTextureCombiner.h>

+ Inheritance diagram for SoTextureCombiner:

Public Types

enum  CombineFunction {
  REPLACE = SbEnums::TEX_MODEL_REPLACE ,
  MODULATE = SbEnums::TEX_MODEL_MODULATE ,
  ADD = SbEnums::TEX_MODEL_ADD ,
  ADD_SIGNED = SbEnums::TEX_MODEL_ADD_SIGNED ,
  INTERPOLATE = SbEnums::TEX_MODEL_INTERPOLATE ,
  SUBTRACT = SbEnums::TEX_MODEL_SUBTRACT ,
  DOT3_RGB = SbEnums::TEX_MODEL_DOT3_RGB ,
  DOT3_RGBA = SbEnums::TEX_MODEL_DOT3_RGBA
}
 Texture Combiner Functions. More...
 
enum  SourceParameter {
  CONSTANT = SbEnums::SRC_PARAM_CONSTANT ,
  PRIMARY_COLOR = SbEnums::SRC_PARAM_PRIMARY_COLOR ,
  PREVIOUS = SbEnums::SRC_PARAM_PREVIOUS ,
  TEXTURE = SbEnums::SRC_PARAM_TEXTURE ,
  TEXTURE0 ,
  TEXTURE1 ,
  TEXTURE2 ,
  TEXTURE3 ,
  TEXTURE4 ,
  TEXTURE5 ,
  TEXTURE6 ,
  TEXTURE7
}
 Source Parameter enumeration values. More...
 
enum  OperandRGBA {
  SRC_COLOR = SbEnums::SRC_COLOR ,
  ONE_MINUS_SRC_COLOR = SbEnums::ONE_MINUS_SRC_COLOR ,
  SRC_ALPHA = SbEnums::SRC_ALPHA ,
  ONE_MINUS_SRC_ALPHA = SbEnums::ONE_MINUS_SRC_ALPHA
}
 Specifies the input mapping for the RGB and alpha portions of operand n. More...
 

Public Member Functions

virtual SoType getTypeId () const
 Returns the type identifier for this specific instance.
 
 SoTextureCombiner ()
 Constructor.
 
- Public Member Functions inherited from SoNode
virtual void setOverride (const SbBool state)
 Turns the override flag on or off.
 
virtual SbBool isOverride () const
 Returns the state of the override flag.
 
virtual SoNodecopy (SbBool copyConnections=FALSE) const
 Creates and returns an exact copy of the node.
 
virtual SbBool affectsState () const
 Returns TRUE if a node has an effect on the state during traversal.
 
virtual void touch ()
 Marks an instance as modified, simulating a change to it.
 
- Public Member Functions inherited from SoFieldContainer
void setToDefaults ()
 Sets all fields in this object to their default values.
 
SbBool hasDefaultValues () const
 Returns TRUE if all of the object's fields have their default values.
 
SbBool fieldsAreEqual (const SoFieldContainer *fc) const
 Returns TRUE if this object's fields are exactly equal to fc's fields.
 
void copyFieldValues (const SoFieldContainer *fc, SbBool copyConnections=FALSE)
 Copies the contents of fc's fields into this object's fields.
 
SoNONUNICODE SbBool set (const char *fieldDataString)
 Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format.
 
SbBool set (const SbString &fieldDataString)
 Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format.
 
void get (SbString &fieldDataString)
 Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string.
 
virtual int getFields (SoFieldList &list) const
 Appends references to all of this object's fields to resultList, and returns the number of fields appended.
 
virtual int getAllFields (SoFieldList &list) const
 Returns a list of fields, including the eventIn's and eventOut's.
 
virtual SoFieldgetField (const SbName &fieldName) const
 Returns a the field of this object whose name is fieldName.
 
virtual SoFieldgetEventIn (const SbName &fieldName) const
 Returns a the eventIn with the given name.
 
virtual SoFieldgetEventOut (const SbName &fieldName) const
 Returns the eventOut with the given name.
 
SbBool getFieldName (const SoField *field, SbName &fieldName) const
 Returns the name of the given field in the fieldName argument.
 
SbBool enableNotify (SbBool flag)
 Notification at this Field Container is enabled (if flag == TRUE) or disabled (if flag == FALSE).
 
SbBool isNotifyEnabled () const
 Notification is the process of telling interested objects that this object has changed.
 
virtual void setUserData (void *data)
 Sets application data.
 
void * getUserData (void) const
 Gets user application data.
 
- Public Member Functions inherited from SoBase
virtual SbName getName () const
 Returns the name of an instance.
 
virtual void setName (const SbName &name)
 Sets the name of an instance.
 
void setSynchronizable (const bool b)
 Sets this to be a ScaleViz synchronizable object.
 
bool isSynchronizable () const
 Gets the ScaleViz synchronizable state of this object.
 
- Public Member Functions inherited from SoRefCounter
void ref () const
 Adds a reference to an instance.
 
void unref () const
 Removes a reference from an instance.
 
void unrefNoDelete () const
 unrefNoDelete() should be called when it is desired to decrement the reference count, but not delete the instance if this brings the reference count to zero.
 
int getRefCount () const
 Returns current reference count.
 
void lock () const
 lock this instance.
 
void unlock () const
 unlock this instance.
 
- Public Member Functions inherited from SoTypedObject
SbBool isOfType (const SoType &type) const
 Returns TRUE if this object is of the type specified in type or is derived from that type.
 
template<typename TypedObjectClass >
SbBool isOfType () const
 Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class.
 

Static Public Member Functions

static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
- Static Public Member Functions inherited from SoNode
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
static SoNodegetByName (const SbName &name)
 A node's name can be set using SoBase::setName().
 
static int getByName (const SbName &name, SoNodeList &list)
 A node's name can be set using SoBase::setName().
 
- Static Public Member Functions inherited from SoFieldContainer
static SoType getClassTypeId ()
 Returns the type of this class.
 
- Static Public Member Functions inherited from SoBase
static SoType getClassTypeId ()
 Returns type identifier for this class.
 
- Static Public Member Functions inherited from SoTypedObject
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 

Public Attributes

SoSFEnum combineRGB
 Specifies the texture combiner function to apply on the source<n>RGB transformed by the operand<n>RGB.
 
SoSFEnum combineAlpha
 Specifies the texture combiner function to apply on the source<n>Alpha transformed by the operand<n>Alpha.
 
SoSFEnum source0RGB
 Specifies one of the three sources for the RGB components.
 
SoSFEnum source1RGB
 Specifies one of the three sources for the RGB components.
 
SoSFEnum source2RGB
 Specifies one of the three sources for the RGB components.
 
SoSFEnum source0Alpha
 Specifies one of the three sources for the alpha components.
 
SoSFEnum source1Alpha
 Specifies one of the three sources for the alpha components.
 
SoSFEnum source2Alpha
 Specifies one of the three sources for the alpha components.
 
SoSFEnum operand0RGB
 Specifies an operand to be applied on the source0RGB before applying the combiner.
 
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 operand0Alpha
 Specifies an operand to be applied on the source0Alpha before applying the combiner.
 
SoSFEnum operand1Alpha
 Specifies an operand to be applied on the source1Alpha before applying the combiner.
 
SoSFEnum operand2Alpha
 Specifies an operand to be applied on the source2Alpha before applying the combiner.
 
SoSFFloat scaleRGB
 Specifies the RGB scale for the entire texture operation and may be 1.0, 2.0, or 4.0.
 
SoSFFloat scaleAlpha
 Specifies the alpha scale for the entire texture operation and may be 1.0, 2.0, or 4.0.
 
SoSFVec4f constantColor
 Specifies a constant color.
 

Detailed Description

VSG extension Texture combiner node.

The Texture Combine Environment Mode is a texture environment function that provides a wide range of programmable combiner functions using the incoming fragment color, texture source color, texture constant color, and the result of the previous texture environment stage as possible parameters. Texture Dot3 Environment offers new combiner function to Texture Combine Environment Mode. Texture Crossbar Environment Mode extends the Texture Combine Environment Mode by allowing use of the texture color from different texture units as sources to the texture combine function.

FILE FORMAT/DEFAULT

    TextureCombiner {
    combineRGB MODULATE
    combineAlpha MODULATE
    source0RGB TEXTURE
    source1RGB PREVIOUS
    source2RGB CONSTANT
    source0Alpha TEXTURE
    source1Alpha PREVIOUS
    source2Alpha CONSTANT
    operand0RGB SRC_COLOR
    operand1RGB SRC_COLOR
    operand2RGB SRC_ALPHA
    operand0Alpha SRC_ALPHA
    operand1Alpha SRC_ALPHA
    operand2Alpha SRC_ALPHA
    scaleRGB 1.0
    scaleAlpha 1.0
    constantColor 0.0 0.0 0.0 0.0
    }

ACTION BEHAVIOR

SEE ALSO

SoComplexity, SoExtTexture2, SoMaterial, SoTexture, SoTexture2, SoTexture2Transform, SoTexture3, SoTextureCoordinate2, SoTextureCoordinateBinding, SoTextureCoordinateFunction, SoTextureCubeMap, SoTextureUnit

Definition at line 96 of file SoTextureCombiner.h.

Member Enumeration Documentation

◆ CombineFunction

Texture Combiner Functions.

Enumerator
REPLACE 

Output fragment is source0.

MODULATE 

Output fragment is source0 * source1.

ADD 

Output fragment is source0 + source1.

ADD_SIGNED 

Output fragment is source0 + source1 - 0.5.

INTERPOLATE 

Output fragment is source0 * source2 + source1 * (1 - source2)

SUBTRACT 

Output fragment is source0 - source1.

DOT3_RGB 

Output fragment R = G = B =
4*((source0r - 0.5) * (source1r -0.5) +
(source0g - 0.5) * (source1g -0.5) +
(source0b - 0.5) * (source1b -0.5) )

DOT3_RGBA 

Output fragment R = G = B = A =
4*((source0r - 0.5) * (source1r -0.5) +
(source0g - 0.5) * (source1g -0.5) +
(source0b - 0.5) * (source1b -0.5) )

Definition at line 103 of file SoTextureCombiner.h.

◆ OperandRGBA

Specifies the input mapping for the RGB and alpha portions of operand n.

See OpenGL documentation for details.

Enumerator
SRC_COLOR 

(Cred, Cgreen, Cblue).


Not accepted for alpha operands.

ONE_MINUS_SRC_COLOR 

(1 - Cred, 1 - Cgreen, 1 - Cblue).


Not accepted for alpha operands.

SRC_ALPHA 

(Calpha, Calpha, Calpha).

ONE_MINUS_SRC_ALPHA 

(1 - Calpha, 1 - Calpha, 1 - Calpha).

Definition at line 209 of file SoTextureCombiner.h.

◆ SourceParameter

Source Parameter enumeration values.

Enumerator
CONSTANT 

Texture environment constant color.


Use the constantColor field to specify the color.

PRIMARY_COLOR 

Primary color of the incoming fragment.

PREVIOUS 

Result of previous texture combiner.


On texture unit 0, corresponds to PRIMARY_COLOR.

TEXTURE 

Texture color of the current texture unit.

TEXTURE0 

Texture color of texture unit 0.


Requires GL_ARB_texture_env_crossbar.

TEXTURE1 

Texture color of texture unit 1.


Requires GL_ARB_texture_env_crossbar.

TEXTURE2 

Texture color of texture unit 2.


Requires GL_ARB_texture_env_crossbar.

TEXTURE3 

Texture color of texture unit 3.


Requires GL_ARB_texture_env_crossbar.

TEXTURE4 

Texture color of texture unit 4.


Requires GL_ARB_texture_env_crossbar.

TEXTURE5 

Texture color of texture unit 5.


Requires GL_ARB_texture_env_crossbar.

TEXTURE6 

Texture color of texture unit 6.


Requires GL_ARB_texture_env_crossbar.

TEXTURE7 

Texture color of texture unit 7.


Requires GL_ARB_texture_env_crossbar.

Definition at line 145 of file SoTextureCombiner.h.

Constructor & Destructor Documentation

◆ SoTextureCombiner()

SoTextureCombiner::SoTextureCombiner ( )

Constructor.

Member Function Documentation

◆ getClassTypeId()

static SoType SoTextureCombiner::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ getTypeId()

virtual SoType SoTextureCombiner::getTypeId ( ) const
virtual

Returns the type identifier for this specific instance.

Reimplemented from SoNode.

Member Data Documentation

◆ combineAlpha

SoSFEnum SoTextureCombiner::combineAlpha

Specifies the texture combiner function to apply on the source<n>Alpha transformed by the operand<n>Alpha.

Use enum CombineFunction. Default is MODULATE.

Definition at line 245 of file SoTextureCombiner.h.

◆ combineRGB

SoSFEnum SoTextureCombiner::combineRGB

Specifies the texture combiner function to apply on the source<n>RGB transformed by the operand<n>RGB.

Use enum CombineFunction. Default is MODULATE.

Definition at line 239 of file SoTextureCombiner.h.

◆ constantColor

SoSFVec4f SoTextureCombiner::constantColor

Specifies a constant color.

Used when SourceParameter enum is CONSTANT.

Definition at line 323 of file SoTextureCombiner.h.

◆ operand0Alpha

SoSFEnum SoTextureCombiner::operand0Alpha

Specifies an operand to be applied on the source0Alpha before applying the combiner.

Use enum OperandRGBA but only the two last values: SRC_ALPHA or ONE_MINUS_SRC_ALPHA. Default is SRC_ALPHA.

Definition at line 299 of file SoTextureCombiner.h.

◆ operand0RGB

SoSFEnum SoTextureCombiner::operand0RGB

Specifies an operand to be applied on the source0RGB before applying the combiner.

Use enum OperandRGBA. Default is SRC_COLOR.

Definition at line 282 of file SoTextureCombiner.h.

◆ operand1Alpha

SoSFEnum SoTextureCombiner::operand1Alpha

Specifies an operand to be applied on the source1Alpha before applying the combiner.

Use enum OperandRGBA but only the two last values: SRC_ALPHA or ONE_MINUS_SRC_ALPHA. Default is SRC_ALPHA.

Definition at line 305 of file SoTextureCombiner.h.

◆ operand1RGB

SoSFEnum SoTextureCombiner::operand1RGB

Specifies an operand to be applied on the source1RGB before applying the combiner.

Use enum OperandRGBA. Default is SRC_COLOR.

Definition at line 287 of file SoTextureCombiner.h.

◆ operand2Alpha

SoSFEnum SoTextureCombiner::operand2Alpha

Specifies an operand to be applied on the source2Alpha before applying the combiner.

Use enum OperandRGBA but only the two last values: SRC_ALPHA or ONE_MINUS_SRC_ALPHA. Default is SRC_ALPHA.

Definition at line 311 of file SoTextureCombiner.h.

◆ operand2RGB

SoSFEnum SoTextureCombiner::operand2RGB

Specifies an operand to be applied on the source2RGB before applying the combiner.

Use enum OperandRGBA. Default is SRC_ALPHA.

Definition at line 292 of file SoTextureCombiner.h.

◆ scaleAlpha

SoSFFloat SoTextureCombiner::scaleAlpha

Specifies the alpha scale for the entire texture operation and may be 1.0, 2.0, or 4.0.

Definition at line 319 of file SoTextureCombiner.h.

◆ scaleRGB

SoSFFloat SoTextureCombiner::scaleRGB

Specifies the RGB scale for the entire texture operation and may be 1.0, 2.0, or 4.0.

Definition at line 315 of file SoTextureCombiner.h.

◆ source0Alpha

SoSFEnum SoTextureCombiner::source0Alpha

Specifies one of the three sources for the alpha components.

Use enum SourceParameter. Default is TEXTURE.

Definition at line 266 of file SoTextureCombiner.h.

◆ source0RGB

SoSFEnum SoTextureCombiner::source0RGB

Specifies one of the three sources for the RGB components.

Use enum SourceParameter. Default is TEXTURE.

Definition at line 250 of file SoTextureCombiner.h.

◆ source1Alpha

SoSFEnum SoTextureCombiner::source1Alpha

Specifies one of the three sources for the alpha components.

Use enum SourceParameter. Default is PREVIOUS .

Definition at line 271 of file SoTextureCombiner.h.

◆ source1RGB

SoSFEnum SoTextureCombiner::source1RGB

Specifies one of the three sources for the RGB components.

Use enum SourceParameter. Default is PREVIOUS .

Definition at line 255 of file SoTextureCombiner.h.

◆ source2Alpha

SoSFEnum SoTextureCombiner::source2Alpha

Specifies one of the three sources for the alpha components.

Use enum SourceParameter. Default is CONSTANT.

Definition at line 276 of file SoTextureCombiner.h.

◆ source2RGB

SoSFEnum SoTextureCombiner::source2RGB

Specifies one of the three sources for the RGB components.

Use enum SourceParameter. Default is CONSTANT.

Definition at line 260 of file SoTextureCombiner.h.


The documentation for this class was generated from the following file: