org.proteinshader.graphics
Class Silhouette

java.lang.Object
  extended by org.proteinshader.graphics.Silhouette

public class Silhouette
extends Object

Uses jitter to repeatedly render a translucent black silhouette of a Drawable object for the purpose of antialiasing (smoothing jagged edges).


Field Summary
static boolean DEFAULT
          Determines if translucent black silhouettes are used by default for antialiasing the dark edges of tubes or ribbons drawn with halftoning.
static double[] JITTER_4
          Holds (xPixels, yPixels) values for translating 4 times with jitter.
 
Constructor Summary
Silhouette(ShaderManager shaders)
          Constructs a Silhouette object.
 
Method Summary
 void drawRibbon(GL gl, Segment s, SegmentListInfo info, boolean extraLines)
          Draws a translucent black silhoutte of a ribbon segment using jitter.
 void drawTube(GL gl, Segment s, SegmentListInfo info, boolean extraLines)
          Draws a translucent black silhoutte of a tube segment using jitter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final boolean DEFAULT
Determines if translucent black silhouettes are used by default for antialiasing the dark edges of tubes or ribbons drawn with halftoning.

See Also:
Constant Field Values

JITTER_4

public static final double[] JITTER_4
Holds (xPixels, yPixels) values for translating 4 times with jitter.

Constructor Detail

Silhouette

public Silhouette(ShaderManager shaders)
Constructs a Silhouette object.

The ShaderManager object used by class StructureToGraphics is needed so that the silhouette shader pair can be turned on right before rendering.

Parameters:
shaders - the shader manager used by StructureToGraphics.
Method Detail

drawTube

public void drawTube(GL gl,
                     Segment s,
                     SegmentListInfo info,
                     boolean extraLines)
Draws a translucent black silhoutte of a tube segment using jitter.

Parameters:
gl - the current GL object.
s - the Segment to draw.
info - holds names of OpenGL display lists for the Segment.
extraLines - indicates if extra lines are drawn at start and end.

drawRibbon

public void drawRibbon(GL gl,
                       Segment s,
                       SegmentListInfo info,
                       boolean extraLines)
Draws a translucent black silhoutte of a ribbon segment using jitter.

Parameters:
gl - the current GL object.
s - the Segment to draw.
info - holds names of OpenGL display lists for the Segment.
extraLines - indicates if extra lines are drawn at start and end.


Copyright © 2007-2008