Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## codeanticode.glgraphics
Class GLModelEffectParameter

    java.lang.Object
      codeanticode.glgraphics.GLSLShaderUniform
          codeanticode.glgraphics.GLModelEffectParameter

All Implemented Interfaces:
  GLConstants

    public class GLModelEffectParameter

extends GLSLShaderUniform

This class stores the (uniform) parameter for a model effect.

Field Summary

Fields inherited from interface codeanticode.glgraphics.GLConstants
`BACKGROUND_ALPHA, COLOR, DOUBLE, FLOAT, FRAGMENT_PROGRAM, GEOMETRY_PROGRAM, GL_DEPTH_STENCIL, GL_DEPTH24_STENCIL8, GL_UNSIGNED_INT_24_8, GLGRAPHICS, IDENTITY_MATRIX, INVERSE_MATRIX, INVERSE_TRANSPOSE_MATRIX, LINE_LOOP, LINE_STRIP, LINEAR, LINEAR_MIPMAP_LINEAR, LINEAR_MIPMAP_NEAREST, NEAREST, NEAREST_MIPMAP_LINEAR, NEAREST_MIPMAP_NEAREST, POINT_SPRITES, SHADER_VAR_FLOAT, SHADER_VAR_INT, SHADER_VAR_MAT2, SHADER_VAR_MAT3, SHADER_VAR_MAT4, SHADER_VAR_MODELVIEW_MAT, SHADER_VAR_MODELVIEW_PROJECTION_MAT, SHADER_VAR_PROJECTION_MAT, SHADER_VAR_TEXTURE_MAT, SHADER_VAR_TEXTURE_SAMPLER, SHADER_VAR_VEC2, SHADER_VAR_VEC3, SHADER_VAR_VEC4, TEX_BYTE, TEX_INT, TEX_NORM, TEX_ONEDIM, TEX_RECT, TRANSPOSE_MATRIX, VERTEX_PROGRAM`

Constructor Summary
`GLModelEffectParameter(processing.core.PApplet parent, GLSLShader shader, java.lang.String name, java.lang.String label, int type)` Creates an instance of GLModelEffectParameter using the specified parameters.
`GLModelEffectParameter(processing.core.PApplet parent, java.lang.String name, java.lang.String label, int type)` Creates an instance of GLModelEffectParameter using the specified parameters.

Method Summary
`java.lang.String` | `getLabel()` Returns parameter label.
`java.lang.String` | `getName()` Returns parameter name.
`int` | `getType()` Returns parameter type.
`static int` | `getType(java.lang.String typeStr)` Returns the int constant that identifies a type, given the corresponding string.
`void` | `setShader(GLShader shader)` Sets the shader this parameter corresponds to.
`void` | `setValue(float value)` Sets the parameter value when the type is float.
`void` | `setValue(float[] value)` Sets the parameter value for any type.
`void` | `setValue(int value)` Sets the parameter value when the type is int.
`void` | `setValue(int i, float value)` Sets the ith value for the parameter (only valid for vec or mat types).
`void` | `setValue(int i, int j, float value)` Sets the (ith, jth) value for the parameter (only valid for mat types).

Methods inherited from class codeanticode.glgraphics.GLSLShaderUniform
`available, copyToShader, init`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### GLModelEffectParameter

    public GLModelEffectParameter(processing.core.PApplet parent,
                                  java.lang.String name,
                                  java.lang.String label,
                                  int type)

  Creates an instance of GLModelEffectParameter using the specified parameters. The shader is set to null.

  Parameters:
    `parent` - PApplet
    `name` - String
    `label` - String
    `type` - int

### GLModelEffectParameter

    public GLModelEffectParameter(processing.core.PApplet parent,
                                  GLSLShader shader,
                                  java.lang.String name,
                                  java.lang.String label,
                                  int type)

  Creates an instance of GLModelEffectParameter using the specified parameters.

  Parameters:
    `parent` - PApplet
    `shader` - GLSLShader
    `name` - String
    `label` - String
    `type` - int

Method Detail

### setShader

    public void setShader(GLShader shader)

  Sets the shader this parameter corresponds to.

  Parameters:
    `shader` - GLShader

### setValue

    public void setValue(int value)

  Sets the parameter value when the type is int.

  Parameters:
    `value` - int

### setValue

    public void setValue(float value)

  Sets the parameter value when the type is float.

  Parameters:
    `value` - float

### setValue

    public void setValue(float[] value)

  Sets the parameter value for any type. When the type is int or float, the first element of the value array is considered.

  Parameters:
    `value` - float[]

### setValue

    public void setValue(int i,
                         float value)

  Sets the ith value for the parameter (only valid for vec or mat types).

  Parameters:
    `int` - i
    `value` - float

### setValue

    public void setValue(int i,
                         int j,
                         float value)

  Sets the (ith, jth) value for the parameter (only valid for mat types).

  Parameters:
    `int` - i
    `int` - j
    `value` - float

### getType

    public static int getType(java.lang.String typeStr)

  Returns the int constant that identifies a type, given the corresponding string.

  Parameters:
    `String` - typeStr
  Returns:
    int

### getType

    public int getType()

  Returns parameter type.

  Returns:
    int

### getName

    public java.lang.String getName()

  Returns parameter name.

  Returns:
    String

### getLabel

    public java.lang.String getLabel()

  Returns parameter label.

  Returns:
    String

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

processing library GLGraphics by Andres Colubri. (c) 2008