|
JMV 0.74 Programmer's Documentation | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--MolecGraphics
Responsible for drawing and updating the molecule graphics.
Field Summary | |
static int |
BACK
Enumeration indicating back light |
javax.media.j3d.DirectionalLight |
backLight
DirectionalLight for back light |
static int |
BGR
Enumeration for color gradient blue-green-red |
static int |
BONDS
Enumeration indicating Bonds drawing representation |
static int |
BW
Enumeration for color gradient black-white |
static int |
BWR
Enumeration for color gradient blue-white-red |
static int |
CARTOON
Enumeration indicating Cartoon drawing representation |
ColorCategory |
cc
ColorCategory for determining and changing colors |
static int |
CHAIN
Enumeration indicating coloring by atom chain |
static int |
CPK
Enumeration indicating CPK drawing representation |
javax.media.j3d.ExponentialFog |
exponentialFog
Fog for depth cueing |
static int |
FRONT
Enumeration indicating front light |
javax.media.j3d.DirectionalLight |
frontLight
DirectionalLight for front light |
static int |
INDEX
Enumeration indicating coloring by atom index |
static int |
LINES
Enumeration indicating Lines drawing representation |
static int |
LOWER
Enumeration indicating lower light |
javax.media.j3d.DirectionalLight |
lowerLight
DirectionalLight for lower light |
static int |
MIX
Enumeration indicating mixed drawing representations |
static int |
NAME
Enumeration indicating coloring by atom name |
static int |
RESNAME
Enumeration indicating coloring by atom residue |
static int |
RGB
Enumeration for color gradient red-green-blue |
static int |
RWB
Enumeration for color gradient red-white-blue |
static int |
SEGNAME
Enumeration indicating coloring by atom segment |
static int |
STEREO_OFF
Enumeration indicating Stereo mode off |
static int |
STEREO_ON
Enumeration indicating Stereo mode on |
static int |
STRUCTURE
Enumeration indicating coloring by structure |
static int |
TRACE
Enumeration indicating Trace drawing representation |
static int |
TUBE
Enumeration indicating Tube drawing representation |
static int |
UPPER
Enumeration indicating upper light |
javax.media.j3d.DirectionalLight |
upperLight
DirectionalLight for upper light |
static int |
VDW
Enumeration indicating VDW drawing representation |
static int |
WB
Enumeration for color gradient white-black |
Constructor Summary | |
MolecGraphics()
Constructor |
Method Summary | |
void |
addUtilities(javax.media.j3d.BranchGroup objRoot)
Adds lights, rotations to the main branch group |
void |
changeColors(Molecule molec,
int rep,
int newScheme)
Changes the color of an already drawn molecule |
void |
changeDepth(int on)
Toggles depth cueing |
void |
changeGradient(int grad)
Sets gradient based on the selected option |
void |
changeLights(int light)
Turns a light in the scene on or off |
void |
changeStereoMode(int mode)
Sets the stereo mode |
static javax.media.j3d.Appearance |
createAPR(float r,
float g,
float b)
Creates an Appearance with the given color uses default shininess, etc |
javax.media.j3d.BranchGroup |
createSceneGraph(Molecule molecule,
int rep,
int colorScheme,
java.util.Vector v)
Creates the entire sceneGraph used when changing molecules |
javax.media.j3d.BranchGroup |
drawAllCylinders(Molecule molecule,
int colorScheme,
float scale)
Draws the bonds of a molecule as cylinders |
javax.media.j3d.BranchGroup |
drawAtoms(Molecule molec,
java.util.Vector v)
Draws atoms on a per atom basis |
javax.media.j3d.BranchGroup |
drawBondAtom(Molecule molec,
int colorScheme,
float scale,
int index)
|
javax.media.j3d.BranchGroup |
drawBonds(Molecule molecule,
int colorScheme)
Draws line representation |
javax.media.j3d.BranchGroup |
drawCPKAtom(Molecule molec,
int colorScheme,
float sphereScale,
float cylScale,
int index)
|
javax.media.j3d.TransformGroup |
drawCylinder(float[] coords,
int startPt,
int endPt,
javax.media.j3d.Appearance currentAppearance,
float scale,
boolean full)
Creates a single cylinder |
javax.media.j3d.BranchGroup |
drawLineAtom(Molecule molecule,
int colorScheme,
int index)
Draws one atom in line representation |
javax.media.j3d.BranchGroup |
drawMolecule(Molecule molecule,
int rep,
int colorScheme)
Returns a branchGroup from the given molecule, with the given representation used when changing the representation. |
javax.media.j3d.BranchGroup |
drawOneSphere(Molecule molecule,
int colorScheme,
float scale,
int index)
Draws one atom as a sphere for a given molecule |
javax.media.j3d.BranchGroup |
drawSpheres(Molecule molecule,
int colorScheme,
float scale)
Draws atoms as spheres for a given molecule |
javax.media.j3d.BranchGroup |
drawTrace(Molecule molec,
int colorScheme)
Draws a molecule in Trace representation |
javax.media.j3d.BranchGroup |
drawTraceAtom(Molecule molec,
int colorScheme,
int index)
Draws a specified atom in Trace representation |
javax.media.j3d.BranchGroup |
drawTube(Molecule molec,
int colorScheme,
float scale)
Draws the molecule in Tube representation |
javax.media.j3d.BranchGroup |
drawTubeAtom(Molecule molec,
int colorScheme,
float scale,
int index)
Draw a single atom in Tube rep |
float[] |
getColorArray(Molecule molec,
int scheme)
Gets the array of colors for a LineArray |
void |
init(java.awt.Panel p)
Initializes the scene and add it to the panel for display |
static javax.media.j3d.BranchGroup |
messageScreen(java.lang.String strMessage)
Creates a quick message screen to display (such as while a molecule is being loaded and created) |
int |
redraw(Molecule molec,
int rep,
int colorScheme,
boolean redrawScene,
java.util.Vector v)
Redraws molecule. |
static javax.media.j3d.BranchGroup |
titleScreen()
Displays the JMV title screen |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public ColorCategory cc
public javax.media.j3d.DirectionalLight frontLight
public javax.media.j3d.DirectionalLight backLight
public javax.media.j3d.DirectionalLight upperLight
public javax.media.j3d.DirectionalLight lowerLight
public javax.media.j3d.ExponentialFog exponentialFog
public static final int STEREO_OFF
public static final int STEREO_ON
public static final int LINES
public static final int VDW
public static final int BONDS
public static final int CPK
public static final int TRACE
public static final int TUBE
public static final int CARTOON
public static final int MIX
public static final int NAME
public static final int INDEX
public static final int RESNAME
public static final int CHAIN
public static final int SEGNAME
public static final int STRUCTURE
public static final int FRONT
public static final int BACK
public static final int UPPER
public static final int LOWER
public static final int RGB
public static final int BGR
public static final int RWB
public static final int BWR
public static final int BW
public static final int WB
Constructor Detail |
public MolecGraphics()
Method Detail |
public static javax.media.j3d.Appearance createAPR(float r, float g, float b)
r
- red componentg
- green componentb
- blue componentpublic void changeGradient(int grad)
grad
- the gradient enumeration to usepublic javax.media.j3d.BranchGroup drawBonds(Molecule molecule, int colorScheme)
molecule
- the molecule to drawcolorScheme
- the color scheme to usepublic javax.media.j3d.BranchGroup drawLineAtom(Molecule molecule, int colorScheme, int index)
molecule
- the Molecule the atom is incolorScheme
- the color scheme in which to color the atomindex
- the index of the atom to drawpublic javax.media.j3d.BranchGroup drawMolecule(Molecule molecule, int rep, int colorScheme)
molecule
- the molecule to drawrep
- the representation (Lines, VDW, etc)colorScheme
- the color scheme to usepublic javax.media.j3d.BranchGroup createSceneGraph(Molecule molecule, int rep, int colorScheme, java.util.Vector v)
molecule
- the new Molecule object to drawrep
- the representation (lines, vdw, etc).colorScheme
- the colorization to use when coloring atomsv
- Vector of PubSynchBean.DrawAtoms's. Only used if rep == MIX.public void addUtilities(javax.media.j3d.BranchGroup objRoot)
objRoot
- the main branchGrouppublic void init(java.awt.Panel p)
p
- Panel to add scene topublic int redraw(Molecule molec, int rep, int colorScheme, boolean redrawScene, java.util.Vector v)
molec
- the new molecule to drawrep
- the representationcolorScheme
- the color scheme to useredrawScene
- redraws the entire scene if true
(entirely new molecule), else just redraws the molecule
(new representation of already drawn molecule)public void changeStereoMode(int mode)
mode
- STEREO_ON to turn it on or STEREO_OFF to turn it offpublic void changeColors(Molecule molec, int rep, int newScheme)
molec
- the molecule to be coloredrep
- the current representation of the moleculenewScheme
- the new color scheme to use in coloring the moleculepublic float[] getColorArray(Molecule molec, int scheme)
molec
- the Molecule to get the colors forscheme
- the color scheme to get colors forpublic javax.media.j3d.TransformGroup drawCylinder(float[] coords, int startPt, int endPt, javax.media.j3d.Appearance currentAppearance, float scale, boolean full)
coords
- the coordinates for the moleculestartPt
- the index of the first atomendPt
- the index of the second atomcurrentAppearance
- the Appearance used to color the cylinderscale
- factor to scale the cylinder radius. The original radius is
determined in MolecGraphicsProperties.full
- if true, draws a full cylinder from startPt to endPt
if false, draws a cylinder starting at startPt, and
ending 1/2 way between startPt and endPt.public javax.media.j3d.BranchGroup drawAllCylinders(Molecule molecule, int colorScheme, float scale)
molecule
- the molecule to draw bonds forcolorScheme
- the color scheme used to color the cylindersscale
- factor to scale the cylinder radius. The original radius is
determined in MolecGraphicsProperties.public javax.media.j3d.BranchGroup drawSpheres(Molecule molecule, int colorScheme, float scale)
molecule
- the Molecule to drawcolorScheme
- the color scheme used to color the spheresscale
- the factor to scale the spheres. The original sizes are
determined by atom namepublic javax.media.j3d.BranchGroup drawOneSphere(Molecule molecule, int colorScheme, float scale, int index)
molecule
- the Molecule to drawcolorScheme
- the color scheme used to color the spheresscale
- the factor to scale the spheres. The original sizes are
determined by atom nameindex
- the atom index of the atom to drawpublic javax.media.j3d.BranchGroup drawTrace(Molecule molec, int colorScheme)
molec
- the molecule to drawcolorScheme
- the color scheme to usepublic javax.media.j3d.BranchGroup drawTraceAtom(Molecule molec, int colorScheme, int index)
molec
- the molecule the atom is incolorScheme
- the color scheme used to color the atomindex
- the atom index of the atompublic javax.media.j3d.BranchGroup drawBondAtom(Molecule molec, int colorScheme, float scale, int index)
public javax.media.j3d.BranchGroup drawCPKAtom(Molecule molec, int colorScheme, float sphereScale, float cylScale, int index)
public javax.media.j3d.BranchGroup drawTube(Molecule molec, int colorScheme, float scale)
molec
- the molecule to drawcolorScheme
- the color scheme to usescale
- the scale for the cylinder radiuspublic javax.media.j3d.BranchGroup drawTubeAtom(Molecule molec, int colorScheme, float scale, int index)
molec
- the moleculecolorScheme
- the color scheme used to color the atomscale
- the scale for cylinder radiusindex
- the index of the atom to drawpublic javax.media.j3d.BranchGroup drawAtoms(Molecule molec, java.util.Vector v)
molec
- the molecule to drawv
- the Vector of PubSynch.DrawAtoms's to drawPubSynchBean.DrawAtoms
public void changeLights(int light)
light
- the index of the light to togglepublic void changeDepth(int on)
on
- 1 if it is to be turned on, else 0public static javax.media.j3d.BranchGroup titleScreen()
public static javax.media.j3d.BranchGroup messageScreen(java.lang.String strMessage)
message
- the message to display
|
Copyright (C) 2000-2002 The Board of Trustees of the University of Illinois | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |