|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.proteinshader.graphics.Shape
public abstract class Shape
Contains common methods needed by classes that draw geometric objects.
Field Summary | |
---|---|
static double |
HALF_PI
One-half Pi is defined as 1.57079632679489. |
static double |
PI
Pi is defined as 3.14159265358979. |
static float[] |
SPECULAR_COLOR
The material specular color is (0.95, 0.95, 0.95, 1.0). |
static double |
TWO_PI
2*Pi is defined as 6.28318530717958. |
Constructor Summary | |
---|---|
Shape()
Constructor for use by subclasses. |
Method Summary | |
---|---|
void |
deleteDisplayList(GL gl,
int displayListName)
Deletes an OpenGL display list. |
void |
executeDisplayList(GL gl,
double scale,
int displayListName)
Executes an OpenGL display list and uniformly scales the geometric object. |
void |
executeDisplayList(GL gl,
int displayListName)
Executes an OpenGL display list. |
void |
setMaterial(GL gl,
float red,
float green,
float blue,
float alpha,
float specularExp)
Sets the material properties for the object about to be drawn. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double PI
public static final double TWO_PI
public static final double HALF_PI
public static final float[] SPECULAR_COLOR
Constructor Detail |
---|
public Shape()
Method Detail |
---|
public void executeDisplayList(GL gl, double scale, int displayListName)
gl
- the current GL object.scale
- the scale factor for the sphere.displayListName
- the name (an integer) of an OpenGL
display list.public void executeDisplayList(GL gl, int displayListName)
gl
- the current GL object.displayListName
- the name (an integer) of an OpenGL
display list.public void deleteDisplayList(GL gl, int displayListName)
displayListName
- the name (an integer) of an OpenGL display
list.public void setMaterial(GL gl, float red, float green, float blue, float alpha, float specularExp)
gl
- the current GL object.red
- component of RGBA colorgreen
- component of RGBA colorblue
- component of RGBA coloralpha
- component of RGBA colorspecularExp
- the specular exponent for Phong lighting
calculations.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |