org.jmol.shape

Class Shape

public abstract class Shape extends Object

After code reorganization of 11/2006 (BH) Shape now encompasses: AtomShape | Balls, Dots, Halos, Labels, Polyhedra, Stars, Vectors | GeoSurface Dipoles, Measures FontLineShape | Axes, Bbcage, Frank, Uccage MeshCollection | | Draw MeshFileCollection (adds parser code) | | Pmesh IsosurfaceMeshCollection (adds JVXL code) | Isosurface |________ LcaoCartoon, MolecularOrbital BioShapeCollection | Backbone, Cartoon, MeshRibbon, Ribbons, Rockets, Strands, Trace Sticks | Hsticks, Sssticks TextShape | Echo, Hover
Field Summary
Graphics3Dg3d
booleanisBioShape
ModelSetmodelSet
intmyVisibilityFlag
intshapeID
protected booleantranslucentAllowed
protected floattranslucentLevel
Viewerviewer
Method Summary
static voidappendCmd(StringBuffer s, String cmd)
voidcheckBoundsMinMax(Point3f pointMin, Point3f pointMax)
Point3fcheckObjectClicked(int x, int y, int modifiers, BitSet bsVisible)
booleancheckObjectDragged(int prevX, int prevY, int deltaX, int deltaY, int modifiers, BitSet bsVisible)
booleancheckObjectHovered(int x, int y, BitSet bsVisible)
StringencodeColor(short colix)
StringencodeTransColor(byte pid, short colix, boolean translucentAllowed)
voidfindNearestAtomIndex(int xMouse, int yMouse, Atom[] closest)
static shortgetColix(short[] colixes, int i, Atom atom)
StringgetColorCommand(String type, short colix)
StringgetColorCommand(String type, byte pid, short colix)
static StringgetFontCommand(String type, Font3D font)
intgetIndexFromName(String thisID)
ObjectgetProperty(String property, int index)
static StringgetShapeCommands(Hashtable htDefine, Hashtable htMore, int atomCount)
static StringgetShapeCommands(Hashtable htDefine, Hashtable htMore, int count, String selectCmd)
VectorgetShapeDetail()
StringgetShapeState()
static StringgetTranslucentLabel(short colix)
ViewergetViewer()
voidinitializeShape(Viewer viewer, Graphics3D g3d, ModelSet modelSet, int shapeID)
protected voidinitModelSet()
voidinitShape()
protected voidremapColors()
shortsetColix(short colix, byte paletteID, int atomIndex)
protected shortsetColix(short colix, byte paletteID, Atom atom)
voidsetModelClickability()
voidsetModelSet(ModelSet modelSet)
voidsetProperty(String propertyName, Object value, BitSet bsSelected)
voidsetSize(int size, BitSet bsSelected)
static voidsetStateInfo(Hashtable ht, int i, String key)
static voidsetStateInfo(Hashtable ht, int i1, int i2, String key)
voidsetVisibilityFlags(BitSet bs)
booleanwasClicked(int x, int y)

Field Detail

g3d

public Graphics3D g3d

isBioShape

public boolean isBioShape

modelSet

public ModelSet modelSet

myVisibilityFlag

public int myVisibilityFlag

shapeID

public int shapeID

translucentAllowed

protected boolean translucentAllowed

translucentLevel

protected float translucentLevel

viewer

public Viewer viewer

Method Detail

appendCmd

public static void appendCmd(StringBuffer s, String cmd)

checkBoundsMinMax

public void checkBoundsMinMax(Point3f pointMin, Point3f pointMax)

checkObjectClicked

public Point3f checkObjectClicked(int x, int y, int modifiers, BitSet bsVisible)

checkObjectDragged

public boolean checkObjectDragged(int prevX, int prevY, int deltaX, int deltaY, int modifiers, BitSet bsVisible)

checkObjectHovered

public boolean checkObjectHovered(int x, int y, BitSet bsVisible)

encodeColor

String encodeColor(short colix)

encodeTransColor

private String encodeTransColor(byte pid, short colix, boolean translucentAllowed)

findNearestAtomIndex

public void findNearestAtomIndex(int xMouse, int yMouse, Atom[] closest)

getColix

public static short getColix(short[] colixes, int i, Atom atom)

getColorCommand

public String getColorCommand(String type, short colix)

getColorCommand

public String getColorCommand(String type, byte pid, short colix)

getFontCommand

public static String getFontCommand(String type, Font3D font)

getIndexFromName

public int getIndexFromName(String thisID)

getProperty

public Object getProperty(String property, int index)

getShapeCommands

public static String getShapeCommands(Hashtable htDefine, Hashtable htMore, int atomCount)

getShapeCommands

public static String getShapeCommands(Hashtable htDefine, Hashtable htMore, int count, String selectCmd)

getShapeDetail

public Vector getShapeDetail()

getShapeState

public String getShapeState()

getTranslucentLabel

private static String getTranslucentLabel(short colix)

getViewer

public Viewer getViewer()

initializeShape

public final void initializeShape(Viewer viewer, Graphics3D g3d, ModelSet modelSet, int shapeID)

initModelSet

protected void initModelSet()

initShape

public void initShape()

remapColors

protected void remapColors()

setColix

public short setColix(short colix, byte paletteID, int atomIndex)

setColix

protected short setColix(short colix, byte paletteID, Atom atom)

setModelClickability

public void setModelClickability()

setModelSet

public void setModelSet(ModelSet modelSet)

setProperty

public void setProperty(String propertyName, Object value, BitSet bsSelected)

setSize

public void setSize(int size, BitSet bsSelected)

setStateInfo

public static void setStateInfo(Hashtable ht, int i, String key)

setStateInfo

public static void setStateInfo(Hashtable ht, int i1, int i2, String key)

setVisibilityFlags

public void setVisibilityFlags(BitSet bs)

wasClicked

public boolean wasClicked(int x, int y)