org.proteinshader.graphics.enums
Enum ShaderEnum

java.lang.Object
  extended by java.lang.Enum<ShaderEnum>
      extended by org.proteinshader.graphics.enums.ShaderEnum
All Implemented Interfaces:
Serializable, Comparable<ShaderEnum>

public enum ShaderEnum
extends Enum<ShaderEnum>

Specifies the types of vertex and fragment shader pairs used in the ProteinShader program, and provides a place to specify the names of the shader files.

The shader files are expected to be in the ProteinShader/shaders directory. The files should follow the convention that vertex shaders end with ".vert", and fragment shaders end with ".frag".


Enum Constant Summary
FPS
          The fps vertex and fragment shader filenames will begin with 'fps'.
GRAY_SCALE
          The gray scale vertex and fragment shader filenames will begin with 'grayscale'.
PATTERNS
          The patterns vertex and fragment shader filenames will begin with 'patterns'.
PHONG
          The Phong vertex and fragment shader filenames will begin with 'phong'.
RIBBON_HALFTONING
          The ribbon halftoning vertex and fragment shader filenames will begin with 'ribbonhalftoning'.
SILHOUETTE
          The silhouette vertex and fragment shader filenames will begin with 'patterns'.
TEXT_LABEL
          The text label vertex and fragment shader filenames will begin with 'textlabel'.
TUBE_CAP_HALFTONING
          The tube cap halftoning vertex and fragment shader filenames will begin with 'tubecaphalftoning'.
TUBE_CAP_WIREFRAME
          The tube cap wireframe vertex and fragment shader filenames will begin with 'tubecapwireframe'.
TUBE_HALFTONING
          The tube halftoning vertex and fragment shader filenames will begin with 'tubehalftoning'.
WIREFRAME
          The wireframe vertex and fragment shader filenames will begin with 'wireframe'.
 
Method Summary
 String getFragFile()
          Returns the name of the file the fragment shader is stored in.
 String getVertFile()
          Returns the name of the file the vertex shader is stored in.
static ShaderEnum valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ShaderEnum[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PHONG

public static final ShaderEnum PHONG
The Phong vertex and fragment shader filenames will begin with 'phong'.


WIREFRAME

public static final ShaderEnum WIREFRAME
The wireframe vertex and fragment shader filenames will begin with 'wireframe'.


TUBE_CAP_WIREFRAME

public static final ShaderEnum TUBE_CAP_WIREFRAME
The tube cap wireframe vertex and fragment shader filenames will begin with 'tubecapwireframe'.


TEXT_LABEL

public static final ShaderEnum TEXT_LABEL
The text label vertex and fragment shader filenames will begin with 'textlabel'.


PATTERNS

public static final ShaderEnum PATTERNS
The patterns vertex and fragment shader filenames will begin with 'patterns'.


SILHOUETTE

public static final ShaderEnum SILHOUETTE
The silhouette vertex and fragment shader filenames will begin with 'patterns'.


TUBE_HALFTONING

public static final ShaderEnum TUBE_HALFTONING
The tube halftoning vertex and fragment shader filenames will begin with 'tubehalftoning'.


TUBE_CAP_HALFTONING

public static final ShaderEnum TUBE_CAP_HALFTONING
The tube cap halftoning vertex and fragment shader filenames will begin with 'tubecaphalftoning'.


RIBBON_HALFTONING

public static final ShaderEnum RIBBON_HALFTONING
The ribbon halftoning vertex and fragment shader filenames will begin with 'ribbonhalftoning'.


GRAY_SCALE

public static final ShaderEnum GRAY_SCALE
The gray scale vertex and fragment shader filenames will begin with 'grayscale'.


FPS

public static final ShaderEnum FPS
The fps vertex and fragment shader filenames will begin with 'fps'.

Method Detail

values

public static final ShaderEnum[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(ShaderEnum c : ShaderEnum.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static ShaderEnum valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

getVertFile

public String getVertFile()
Returns the name of the file the vertex shader is stored in.

Returns:
The vertex shader file name.

getFragFile

public String getFragFile()
Returns the name of the file the fragment shader is stored in.

Returns:
The fragment shader file name.


Copyright © 2007-2008