|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.proteinshader.graphics.Shape org.proteinshader.graphics.ExtrudedShape org.proteinshader.graphics.FrenetFrames
public class FrenetFrames
Provides a visual representation of the LocalFrame objects of a
Segment by drawing an x-axis, a y-axis, and z-axis.
Field Summary | |
---|---|
static double |
AXIS_RADIUS
The radius for an axis is 0.05 angtroms. |
static float[] |
BASE
The small sphere at the base of the xyz-axes is gray. |
static int |
FRAMES_PER_SEGMENT
The default number of frames per segment in a FRENET_FRAME display is 21. |
static double |
MAJOR_AXIS_SCALE
The scale factor for major axes is 1.5. |
static double |
MAJOR_SPHERE_RADIUS
The radius for spheres at major points is 0.3. |
static int |
MAJOR_SPHERE_TILING
The number of slices and stacks for a major sphere is 30. |
static double |
MINOR_AXIS_SCALE
The scale factor for minor axes is 0.5. |
static double |
MINOR_SPHERE_RADIUS
The radius for spheres at minor points is 0.0375. |
static int |
MINOR_SPHERE_TILING
The number of slices and stacks for a minor sphere is 10. |
static int |
SLICES
The number of slices for a cylinder is 10. |
static float |
SPECULAR_EXP
The value for the specular exponent is 20.0. |
static int |
STACKS
The number of stacks for a cylinder is 1. |
static double |
TIP_FRACTION
The length of an arrow tip as a fraction of the axis length is 0.1. |
static double |
TIP_RADIUS
The radius of the large end of an arrow tip is 0.08 angstroms. |
static float[] |
X
The x-axis is green. |
static float[] |
Y
The y-axis is yellow. |
static float[] |
Z
The z-axis is red. |
Fields inherited from class org.proteinshader.graphics.ExtrudedShape |
---|
END_CAP_COLOR, START_CAP_COLOR |
Fields inherited from class org.proteinshader.graphics.Shape |
---|
HALF_PI, PI, SPECULAR_COLOR, TWO_PI |
Constructor Summary | |
---|---|
FrenetFrames()
Constructs a FrenetFrames object. |
Method Summary | |
---|---|
void |
draw(GL gl,
LocalFrame[] frames)
Uses an array of LocalFrame objects to draw xyz-axes. |
void |
draw(GL gl,
LocalFrame frame,
double scale,
double sphereRadius,
int sphereTiling,
float sphereRed,
float sphereGreen,
float sphereBlue,
float sphereAlpha)
Draws an xyz-axis based on the rotation and translation in the LocalFrame given as an argument. |
void |
drawEndCap(GL gl,
LocalFrame frame)
Draws the local frame using red for the sphere at the base. |
void |
drawStartCap(GL gl,
LocalFrame frame)
Draws the local frame using light blue for the sphere at the base. |
void |
setShaders(ShaderManager shaders)
The ShaderManager is only needed because of an apparent bug on some Mac OS X machines where material color can only be set once after a custom shader is set, so to draw Frenet frames with more than one color, the shaders must be reset each time. |
Methods inherited from class org.proteinshader.graphics.ExtrudedShape |
---|
applyEndCapColor, applyStartCapColor, createDisplayList, createDisplayLists, createEndCapDisplayList, createStartCapDisplayList |
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 int FRAMES_PER_SEGMENT
public static final double AXIS_RADIUS
public static final double TIP_RADIUS
public static final double TIP_FRACTION
public static final double MINOR_AXIS_SCALE
public static final double MAJOR_AXIS_SCALE
public static final double MAJOR_SPHERE_RADIUS
public static final double MINOR_SPHERE_RADIUS
public static final int SLICES
public static final int STACKS
public static final int MAJOR_SPHERE_TILING
public static final int MINOR_SPHERE_TILING
public static final float SPECULAR_EXP
public static final float[] X
public static final float[] Y
public static final float[] Z
public static final float[] BASE
Constructor Detail |
---|
public FrenetFrames()
Method Detail |
---|
public void setShaders(ShaderManager shaders)
shaders
- the shader manager object.public void draw(GL gl, LocalFrame[] frames)
draw
in class ExtrudedShape
gl
- the current GL object.frames
- array of LocalFrames for positioning a waist
polygon.public void drawStartCap(GL gl, LocalFrame frame)
drawStartCap
in class ExtrudedShape
gl
- the current GL object.frame
- the frame for positioning the waist polygon.public void drawEndCap(GL gl, LocalFrame frame)
drawEndCap
in class ExtrudedShape
gl
- the current GL object.frame
- the frame for positioning the waist polygon.public void draw(GL gl, LocalFrame frame, double scale, double sphereRadius, int sphereTiling, float sphereRed, float sphereGreen, float sphereBlue, float sphereAlpha)
gl
- the current GL object.frame
- a LocalFrame with a rotation and a translation.scale
- a scale factor for the axes to draw.sphereRadius
- the radius of the sphere at the base of the xyz-axes.sphereTiling
- the number of slices and stacks for the sphere.sphereRed
- the red channel for sphere at base of xyz-axes.sphereGreen
- the green channel for sphere at base of xyz-axes.sphereBlue
- the blue channel for sphere at base of xyz-axes.sphereAlpha
- the alpha channel for sphere at base of xyz-axes.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |