Rings
Version 0.3

threeD.raytracer.shaders
Class ShaderFactory

java.lang.Object
  extended bythreeD.raytracer.util.EditableFactory
      extended bythreeD.raytracer.shaders.ShaderFactory

public class ShaderFactory
extends EditableFactory

The ShaderFactory class provides static methods for constructing Shader objects.


Field Summary
static int blendingShader
           
static int diffuseShader
           
static int highlightShader
           
static int reflectionShader
           
static int refractionShader
           
static int silhouetteShader
           
static int textureShader
           
 
Constructor Summary
ShaderFactory()
           
 
Method Summary
 Editable constructObject(int index)
          Constructs a Shader object of the type specified by the integer index.
 java.lang.String[] getTypeNames()
          Returns an array of String objects containing names for each type of Shader object this ShaderFactory can construct.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

blendingShader

public static final int blendingShader
See Also:
Constant Field Values

diffuseShader

public static final int diffuseShader
See Also:
Constant Field Values

highlightShader

public static final int highlightShader
See Also:
Constant Field Values

reflectionShader

public static final int reflectionShader
See Also:
Constant Field Values

refractionShader

public static final int refractionShader
See Also:
Constant Field Values

silhouetteShader

public static final int silhouetteShader
See Also:
Constant Field Values

textureShader

public static final int textureShader
See Also:
Constant Field Values
Constructor Detail

ShaderFactory

public ShaderFactory()
Method Detail

getTypeNames

public java.lang.String[] getTypeNames()
Returns an array of String objects containing names for each type of Shader object this ShaderFactory can construct.

Specified by:
getTypeNames in class EditableFactory

constructObject

public Editable constructObject(int index)
Constructs a Shader object of the type specified by the integer index.

Specified by:
constructObject in class EditableFactory
Throws:
java.lang.IndexOutOfBoundsException - If the specified index does not correspond to a type of shader.

Rings
Version 0.3

Copyright 2003-05 Mike Murray