org.proteinshader.gui.enums
Enum JitterEnum

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

public enum JitterEnum
extends Enum<JitterEnum>

Holds the xy-coordinates needed for jittering a scene to accomplish antialiasing (the smoothing of jagged edge lines).

The xy-coordinates are expressed in pixels, and are recommended values from the OpenGL Programming Guide (2005) by Shreiner, R, Woo, M, Neider, J, & Davis, T, Upper Saddle River, NJ: Addison-Wesley.


Enum Constant Summary
JITTER_12
          Holds xy-coordinates for translating 12 times with jitter.
JITTER_16
          Holds xy-coordinates for translating 16 times with jitter.
JITTER_2
          Holds xy-coordinates for translating 2 times with jitter.
JITTER_3
          Holds xy-coordinates for translating 3 times with jitter.
JITTER_4
          Holds xy-coordinates for translating 4 times with jitter.
JITTER_5
          Holds xy-coordinates for translating 5 times with jitter.
JITTER_6
          Holds xy-coordinates for translating 6 times with jitter.
JITTER_8
          Holds xy-coordinates for translating 8 times with jitter.
JITTER_9
          Holds xy-coordinates for translating 9 times with jitter.
 
Method Summary
 double[][] getMatrix()
          Returns a two-dimensional matrix where each row has an xy-coordinate pair that can be used to jitter a scene.
 String toString()
          Returns the number of xy-coordinate pairs as a String so that the enum can be used in a Swing GUI menu.
static JitterEnum valueOf(String name)
          Returns the enum constant of this type with the specified name.
static JitterEnum[] 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, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

JITTER_2

public static final JitterEnum JITTER_2
Holds xy-coordinates for translating 2 times with jitter.


JITTER_3

public static final JitterEnum JITTER_3
Holds xy-coordinates for translating 3 times with jitter.


JITTER_4

public static final JitterEnum JITTER_4
Holds xy-coordinates for translating 4 times with jitter.


JITTER_5

public static final JitterEnum JITTER_5
Holds xy-coordinates for translating 5 times with jitter.


JITTER_6

public static final JitterEnum JITTER_6
Holds xy-coordinates for translating 6 times with jitter.


JITTER_8

public static final JitterEnum JITTER_8
Holds xy-coordinates for translating 8 times with jitter.


JITTER_9

public static final JitterEnum JITTER_9
Holds xy-coordinates for translating 9 times with jitter.


JITTER_12

public static final JitterEnum JITTER_12
Holds xy-coordinates for translating 12 times with jitter.


JITTER_16

public static final JitterEnum JITTER_16
Holds xy-coordinates for translating 16 times with jitter.

Method Detail

values

public static final JitterEnum[] 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(JitterEnum c : JitterEnum.values())
        System.out.println(c);

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

valueOf

public static JitterEnum 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

getMatrix

public double[][] getMatrix()
Returns a two-dimensional matrix where each row has an xy-coordinate pair that can be used to jitter a scene.

The number of xy pairs will be the same as the number in the name of an individual JitterEnum (e.g., JITTER_4 will have 4 rows, and each row has an x-coordinate in column 0 and a y-coordinate in column 1). The matrix returned is an independent copy of the matrix held by the JitterEnum. A reference to the copy is not kept, so changes to the copy cannot affect the original.

Returns:
A copy of the matrix of xy-coordinates.

toString

public String toString()
Returns the number of xy-coordinate pairs as a String so that the enum can be used in a Swing GUI menu.

Overrides:
toString in class Enum<JitterEnum>
Returns:
The number of xy-coordinates pairs held by this JitterEnum object.


Copyright © 2007-2008