SoBlendElement Class Reference
[Elements]

VSG extension Stores the current blending mode and parameters. More...

#include <Inventor/elements/SoBlendElement.h>

Inheritance diagram for SoBlendElement:
SoElement SoTypedObject

List of all members.

Classes

struct  BlendElementParameters
 BlendElementParameters packages all the different blending parameters. More...

Public Types

enum  BlendFactor {
  ZERO = SbEnums::BLEND_ZERO,
  ONE = SbEnums::BLEND_ONE,
  SRC_COLOR = SbEnums::BLEND_SRC_COLOR,
  ONE_MINUS_SRC_COLOR = SbEnums::BLEND_ONE_MINUS_SRC_COLOR,
  DST_COLOR = SbEnums::BLEND_DST_COLOR,
  ONE_MINUS_DST_COLOR = SbEnums::BLEND_ONE_MINUS_DST_COLOR,
  SRC_ALPHA = SbEnums::BLEND_SRC_ALPHA,
  ONE_MINUS_SRC_ALPHA = SbEnums::BLEND_ONE_MINUS_SRC_ALPHA,
  DST_ALPHA = SbEnums::BLEND_DST_ALPHA,
  ONE_MINUS_DST_ALPHA = SbEnums::BLEND_ONE_MINUS_DST_ALPHA,
  CONSTANT_COLOR = SbEnums::BLEND_CONSTANT_COLOR,
  ONE_MINUS_CONSTANT_COLOR = SbEnums::BLEND_ONE_MINUS_CONSTANT_COLOR,
  CONSTANT_ALPHA = SbEnums::BLEND_CONSTANT_ALPHA,
  ONE_MINUS_CONSTANT_ALPHA = SbEnums::BLEND_ONE_MINUS_CONSTANT_ALPHA,
  SRC_ALPHA_SATURATE = SbEnums::BLEND_SRC_ALPHA_SATURATE,
  SRC1_COLOR = SbEnums::BLEND_SRC1_COLOR,
  ONE_MINUS_SRC1_COLOR = SbEnums::BLEND_ONE_MINUS_SRC1_COLOR,
  SRC1_ALPHA = SbEnums::BLEND_SRC1_ALPHA,
  ONE_MINUS_SRC1_ALPHA = SbEnums::BLEND_ONE_MINUS_SRC1_ALPHA
}
enum  BlendEquation {
  FUNC_ADD = SbEnums::BLEND_FUNC_ADD,
  FUNC_SUBTRACT = SbEnums::BLEND_FUNC_SUBTRACT,
  FUNC_REVERSE_SUBTRACT = SbEnums::BLEND_FUNC_REVERSE_SUBTRACT,
  MIN = SbEnums::BLEND_FUNC_MIN,
  MAX = SbEnums::BLEND_FUNC_MAX
}

Public Member Functions

virtual void print (FILE *fp) const
virtual void push (SoState *state)
virtual void pop (SoState *state, const SoElement *prevTopElement)

Static Public Member Functions

static SoType getClassTypeId ()
static int getClassStackIndex ()
static void set (SoState *state, const BlendElementParameters &parameters)
static void setBlending (SoState *state, bool enabled)
static void setFunction (SoState *state, const BlendFactor source, const BlendFactor destination)
static void get (SoState *state, BlendElementParameters &parameter)

Detailed Description

VSG extension Stores the current blending mode and parameters.

This element stores the current blending mode, including source and target factors for RGB and Alpha values, equation and color.


Member Enumeration Documentation

Blend Equation as defined by OpenGL's glBlendEquation.

Enumerator:
FUNC_ADD 
FUNC_SUBTRACT 
FUNC_REVERSE_SUBTRACT 
MIN 
MAX 

BlendFactor as defined by OpenGL's glBlendFunc.

Enumerator:
ZERO 
ONE 
SRC_COLOR 
ONE_MINUS_SRC_COLOR 
DST_COLOR 
ONE_MINUS_DST_COLOR 
SRC_ALPHA 
ONE_MINUS_SRC_ALPHA 
DST_ALPHA 
ONE_MINUS_DST_ALPHA 
CONSTANT_COLOR 
ONE_MINUS_CONSTANT_COLOR 
CONSTANT_ALPHA 
ONE_MINUS_CONSTANT_ALPHA 
SRC_ALPHA_SATURATE 
SRC1_COLOR 
ONE_MINUS_SRC1_COLOR 
SRC1_ALPHA 
ONE_MINUS_SRC1_ALPHA 

Member Function Documentation

static void SoBlendElement::get ( SoState state,
BlendElementParameters parameter 
) [static]

Retrieves the current blending parameters.

static int SoBlendElement::getClassStackIndex (  )  [static]

Returns the stack id for this element.

Reimplemented from SoElement.

static SoType SoBlendElement::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoElement.

virtual void SoBlendElement::pop ( SoState state,
const SoElement prevTopElement 
) [virtual]

Override pop() method to keep GL up to date.

virtual void SoBlendElement::print ( FILE *  fp  )  const [virtual]

Prints element (for debugging).

Reimplemented from SoElement.

virtual void SoBlendElement::push ( SoState state  )  [virtual]

Override push() method to keep GL up to date.

Reimplemented from SoElement.

static void SoBlendElement::set ( SoState state,
const BlendElementParameters parameters 
) [static]

Sets the blending parameters.

static void SoBlendElement::setBlending ( SoState state,
bool  enabled 
) [static]

Enable or disable blending.

static void SoBlendElement::setFunction ( SoState state,
const BlendFactor  source,
const BlendFactor  destination 
) [static]

Sets the blending function.

Convenience function to shorten code only setting the blending function withput separating components.


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

Open Inventor Toolkit reference manual, generated on 4 Sep 2023
Copyright © Thermo Fisher Scientific All rights reserved.
https://www.openinventor.com/