net.java.joglutils.msg.nodes
Class Blend

java.lang.Object
  extended by net.java.joglutils.msg.nodes.Node
      extended by net.java.joglutils.msg.nodes.Blend

public class Blend
extends Node

Provides control over OpenGL blending modes.


Field Summary
static int CONSTANT_ALPHA
          One of the blend functions.
static int CONSTANT_COLOR
          One of the blend functions.
static int DST_ALPHA
          One of the blend functions.
static int DST_COLOR
          One of the blend functions.
static int FUNC_ADD
          One of the blend equations.
static int FUNC_REVERSE_SUBTRACT
          One of the blend equations.
static int FUNC_SUBTRACT
          One of the blend equations.
static int MAX
          One of the blend equations.
static int MIN
          One of the blend equations.
static int ONE
          One of the blend functions.
static int ONE_MINUS_CONSTANT_ALPHA
          One of the blend functions.
static int ONE_MINUS_CONSTANT_COLOR
          One of the blend functions.
static int ONE_MINUS_DST_ALPHA
          One of the blend functions.
static int ONE_MINUS_DST_COLOR
          One of the blend functions.
static int ONE_MINUS_SRC_ALPHA
          One of the blend functions.
static int ONE_MINUS_SRC_COLOR
          One of the blend functions.
static int SRC_ALPHA
          One of the blend functions.
static int SRC_ALPHA_SATURATE
          One of the blend functions.
static int SRC_COLOR
          One of the blend functions.
static int ZERO
          One of the blend functions.
 
Constructor Summary
Blend()
           
 
Method Summary
 void doAction(Action action)
          Performs the "typical" operation for this node when an action is applied to it.
 Vec4f getBlendColor()
          Gets the blending color; see the documentation for glBlendColor for more details.
 int getBlendEquation()
          Returns the blending equation.
 int getDestFunc()
          Returns the destination blending function.
 boolean getEnabled()
          Returns whether blending is enabled.
 int getSourceFunc()
          Returns the source blending function.
 void setBlendColor(Vec4f color)
          Sets the blending color; see the documentation for glBlendColor for more details.
 void setBlendEquation(int equation)
          Sets the blending equation to one of FUNC_ADD, FUNC_SUBTRACT, FUNC_REVERSE_SUBTRACT, MIN, or MAX.
 void setDestFunc(int func)
          Sets the destination blending function to one of 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, SRC_ALPHA_SATURATE, CONSTANT_COLOR, ONE_MINUS_CONSTANT_COLOR, CONSTANT_ALPHA, or ONE_MINUS_CONSTANT_ALPHA.
 void setEnabled(boolean enabled)
          Sets whether blending is enabled.
 void setSourceFunc(int func)
          Sets the source blending function to one of 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, SRC_ALPHA_SATURATE, CONSTANT_COLOR, ONE_MINUS_CONSTANT_COLOR, CONSTANT_ALPHA, or ONE_MINUS_CONSTANT_ALPHA.
 
Methods inherited from class net.java.joglutils.msg.nodes.Node
rayPick, render
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ZERO

public static final int ZERO
One of the blend functions. See the OpenGL documentation for glBlendFunc for more details.

See Also:
Constant Field Values

ONE

public static final int ONE
One of the blend functions. See the OpenGL documentation for glBlendFunc for more details.

See Also:
Constant Field Values

SRC_COLOR

public static final int SRC_COLOR
One of the blend functions. See the OpenGL documentation for glBlendFunc for more details.

See Also:
Constant Field Values

ONE_MINUS_SRC_COLOR

public static final int ONE_MINUS_SRC_COLOR
One of the blend functions. See the OpenGL documentation for glBlendFunc for more details.

See Also:
Constant Field Values

DST_COLOR

public static final int DST_COLOR
One of the blend functions. See the OpenGL documentation for glBlendFunc for more details.

See Also:
Constant Field Values

ONE_MINUS_DST_COLOR

public static final int ONE_MINUS_DST_COLOR
One of the blend functions. See the OpenGL documentation for glBlendFunc for more details.

See Also:
Constant Field Values

SRC_ALPHA

public static final int SRC_ALPHA
One of the blend functions. See the OpenGL documentation for glBlendFunc for more details.

See Also:
Constant Field Values

ONE_MINUS_SRC_ALPHA

public static final int ONE_MINUS_SRC_ALPHA
One of the blend functions. See the OpenGL documentation for glBlendFunc for more details.

See Also:
Constant Field Values

DST_ALPHA

public static final int DST_ALPHA
One of the blend functions. See the OpenGL documentation for glBlendFunc for more details.

See Also:
Constant Field Values

ONE_MINUS_DST_ALPHA

public static final int ONE_MINUS_DST_ALPHA
One of the blend functions. See the OpenGL documentation for glBlendFunc for more details.

See Also:
Constant Field Values

SRC_ALPHA_SATURATE

public static final int SRC_ALPHA_SATURATE
One of the blend functions. See the OpenGL documentation for glBlendFunc for more details.

See Also:
Constant Field Values

CONSTANT_COLOR

public static final int CONSTANT_COLOR
One of the blend functions. See the OpenGL documentation for glBlendFunc for more details.

See Also:
Constant Field Values

ONE_MINUS_CONSTANT_COLOR

public static final int ONE_MINUS_CONSTANT_COLOR
One of the blend functions. See the OpenGL documentation for glBlendFunc for more details.

See Also:
Constant Field Values

CONSTANT_ALPHA

public static final int CONSTANT_ALPHA
One of the blend functions. See the OpenGL documentation for glBlendFunc for more details.

See Also:
Constant Field Values

ONE_MINUS_CONSTANT_ALPHA

public static final int ONE_MINUS_CONSTANT_ALPHA
One of the blend functions. See the OpenGL documentation for glBlendFunc for more details.

See Also:
Constant Field Values

FUNC_ADD

public static final int FUNC_ADD
One of the blend equations. See the OpenGL documentation for glBlendEquation for more details.

See Also:
Constant Field Values

FUNC_SUBTRACT

public static final int FUNC_SUBTRACT
One of the blend equations. See the OpenGL documentation for glBlendEquation for more details.

See Also:
Constant Field Values

FUNC_REVERSE_SUBTRACT

public static final int FUNC_REVERSE_SUBTRACT
One of the blend equations. See the OpenGL documentation for glBlendEquation for more details.

See Also:
Constant Field Values

MIN

public static final int MIN
One of the blend equations. See the OpenGL documentation for glBlendEquation for more details.

See Also:
Constant Field Values

MAX

public static final int MAX
One of the blend equations. See the OpenGL documentation for glBlendEquation for more details.

See Also:
Constant Field Values
Constructor Detail

Blend

public Blend()
Method Detail

setEnabled

public void setEnabled(boolean enabled)
Sets whether blending is enabled. Defaults to false.


getEnabled

public boolean getEnabled()
Returns whether blending is enabled. Defaults to false.


setSourceFunc

public void setSourceFunc(int func)
Sets the source blending function to one of 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, SRC_ALPHA_SATURATE, CONSTANT_COLOR, ONE_MINUS_CONSTANT_COLOR, CONSTANT_ALPHA, or ONE_MINUS_CONSTANT_ALPHA. The default is ONE.


getSourceFunc

public int getSourceFunc()
Returns the source blending function. The default is ONE.


setDestFunc

public void setDestFunc(int func)
Sets the destination blending function to one of 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, SRC_ALPHA_SATURATE, CONSTANT_COLOR, ONE_MINUS_CONSTANT_COLOR, CONSTANT_ALPHA, or ONE_MINUS_CONSTANT_ALPHA. The default is ZERO.


getDestFunc

public int getDestFunc()
Returns the destination blending function. The default is ZERO.


setBlendEquation

public void setBlendEquation(int equation)
Sets the blending equation to one of FUNC_ADD, FUNC_SUBTRACT, FUNC_REVERSE_SUBTRACT, MIN, or MAX. Defaults to FUNC_ADD.


getBlendEquation

public int getBlendEquation()
Returns the blending equation. Defaults to FUNC_ADD.


setBlendColor

public void setBlendColor(Vec4f color)
Sets the blending color; see the documentation for glBlendColor for more details. Defaults to [0, 0, 0, 0].


getBlendColor

public Vec4f getBlendColor()
Gets the blending color; see the documentation for glBlendColor for more details. Defaults to [0, 0, 0, 0].


doAction

public void doAction(Action action)
Description copied from class: Node
Performs the "typical" operation for this node when an action is applied to it. The default implementation does nothing.

Overrides:
doAction in class Node