|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.proteinshader.graphics.Shape
org.proteinshader.graphics.ExtrudedShape
public abstract class ExtrudedShape
Contains common methods needed by classes that draw segments of a three-dimensional tube by sweeping a waist polygon along a spline.
| Field Summary | |
|---|---|
static float[] |
END_CAP_COLOR
Segment end (carboxyl end) caps are colored red because that is the CPK color for oxygen. |
static float[] |
START_CAP_COLOR
Segment start (amino end) caps are colored light blue because that is the CPK color for nitrogen. |
| Fields inherited from class org.proteinshader.graphics.Shape |
|---|
HALF_PI, PI, SPECULAR_COLOR, TWO_PI |
| Constructor Summary | |
|---|---|
ExtrudedShape()
Constructor for use by subclasses. |
|
| Method Summary | |
|---|---|
void |
applyEndCapColor(GL gl,
float alpha,
float specularExp)
Calls the setMaterial() method of superclass Shape with the END_CAP_COLOR along with the alpha value and specular exponent given as aguments. |
void |
applyStartCapColor(GL gl,
float alpha,
float specularExp)
Calls the setMaterial() method of superclass Shape with the START_CAP_COLOR along with the alpha value and specular exponent given as aguments. |
int |
createDisplayList(GL gl,
LocalFrame[] frames)
Uses an array of LocalFrame objects to draw a segment of a tube and saves the geometry (a collection of vertices) as an OpenGL display list. |
void |
createDisplayLists(GL gl,
LocalFrame[] frames,
SegmentListInfo info)
Creates three OpenGL display lists: one created by calling draw(), one created by calling drawStartCap(), and one created by calling drawEndCap(). |
int |
createEndCapDisplayList(GL gl,
LocalFrame[] frames)
Uses the last LocalFrame in the array to position a segment end cap that is saved as an OpenGL display list. |
int |
createStartCapDisplayList(GL gl,
LocalFrame[] frames)
Uses the first LocalFrame in the array to position a segment start cap that is saved as an OpenGL display list. |
abstract void |
draw(GL gl,
LocalFrame[] frames)
Uses an array of LocalFrame objects to draw a segment of an extruded shape. |
abstract void |
drawEndCap(GL gl,
LocalFrame frame)
Creates a cap for the end of a segment by drawing the waist polygon. |
abstract void |
drawStartCap(GL gl,
LocalFrame frame)
Creates a cap for the beginning of a segment by drawing the waist polygon. |
| Methods inherited from class org.proteinshader.graphics.Shape |
|---|
deleteDisplayList, executeDisplayList, executeDisplayList, setMaterial |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final float[] START_CAP_COLOR
public static final float[] END_CAP_COLOR
| Constructor Detail |
|---|
public ExtrudedShape()
| Method Detail |
|---|
public abstract void draw(GL gl,
LocalFrame[] frames)
gl - the current GL object.frames - array of LocalFrames for positioning a waist
polygon.
public abstract void drawStartCap(GL gl,
LocalFrame frame)
gl - the current GL object.frame - the frame for positioning the waist polygon.
public abstract void drawEndCap(GL gl,
LocalFrame frame)
gl - the current GL object.frame - the frame for positioning the waist polygon.
public void applyStartCapColor(GL gl,
float alpha,
float specularExp)
gl - the current GL object.alpha - component of RGBA colorspecularExp - the specular exponent for Phong lighting
calculations.
public void applyEndCapColor(GL gl,
float alpha,
float specularExp)
gl - the current GL object.alpha - component of RGBA colorspecularExp - the specular exponent for Phong lighting
calculations.
public void createDisplayLists(GL gl,
LocalFrame[] frames,
SegmentListInfo info)
gl - the current GL object.frames - array of LocalFrames for positioning a waist
polygon.info - the info object to store the name (an integer) of
each OpenGL display list that is created.
public int createDisplayList(GL gl,
LocalFrame[] frames)
gl - the current GL object.frames - array of LocalFrames for positioning a waist
polygon.
public int createStartCapDisplayList(GL gl,
LocalFrame[] frames)
gl - the current GL object.frames - array of LocalFrames for positioning a waist
polygon.
public int createEndCapDisplayList(GL gl,
LocalFrame[] frames)
gl - the current GL object.frames - array of LocalFrames for positioning a waist
polygon.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||