|
JMV 0.80 Programmer's Documentation | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ColorCategory
Storage for color info and methods for choosing and creating colors
Field Summary | |
static javax.media.j3d.Appearance[] |
m_appearanceArray
current Appearance array, contains Appearances for each of the rgb colors in m_colorArray |
static float[][] |
m_colorArray
current color array of (r,g,b) values |
static float[] |
m_endColor
end color for color range |
static float[] |
m_midColor
middle color for color range |
static float[] |
m_startColor
start color for color range |
Constructor Summary | |
ColorCategory()
Default constructor |
Method Summary | |
void |
changeRangeColors(float[] start,
float[] mid,
float[] end)
Changes the start, middle, and end colors used for creating color ranges |
static float[][] |
createColorsByIndexRange(int numColors)
Creates a color table from a user-supplied index range It creates a list of rgb colors that fade from m_startColor to m_midColor to m_endColor. |
javax.media.j3d.Appearance |
getAppearance(Molecule molec,
int index,
int colorScheme)
Gets the Appearance for a specific atom in a molecule |
float[] |
getColor(Molecule molec,
int index,
int colorScheme)
Gets the color for a specific atom in a molecule |
static int |
mapFloat2Color(float value,
float min,
float max)
Maps floating point data to a color gradient palette |
static int |
mapIndex2Color(int totalindices,
int index)
Maps zero or one-based integer indexed data to a color gradient palette |
static void |
setColorArray(Molecule molec,
int scheme)
Creates the array of colors to use in the scene Also creates the array of Appearances |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static float[][] m_colorArray
public static javax.media.j3d.Appearance[] m_appearanceArray
public static float[] m_startColor
public static float[] m_midColor
public static float[] m_endColor
Constructor Detail |
public ColorCategory()
Method Detail |
public static float[][] createColorsByIndexRange(int numColors)
numColors
- the number of colors to create
public void changeRangeColors(float[] start, float[] mid, float[] end)
start
- a float array with rgb values for the starting colorpublic float[] getColor(Molecule molec, int index, int colorScheme)
molec
- the Molecule being coloredindex
- the Atom index of the atom to be colored in the MoleculecolorScheme
- the current coloring scheme used
public javax.media.j3d.Appearance getAppearance(Molecule molec, int index, int colorScheme)
molec
- the Molecule being coloredindex
- the Atom index of the atom to be colored in the MoleculecolorScheme
- the current coloring scheme used
public static int mapIndex2Color(int totalindices, int index)
index
- the current index for the atom to colorpublic static int mapFloat2Color(float value, float min, float max)
value
- float value to calculate index formin
- minimum index value in color gradientmax
- maximum index value in color gradientpublic static void setColorArray(Molecule molec, int scheme)
molec
- Molecule to calculate colors forscheme
- color scheme to use
|
Copyright (C) 2000-2002 The Board of Trustees of the University of Illinois | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |