Package org.jmol.shape
Class Shape
java.lang.Object
org.jmol.shape.Shape
- Direct Known Subclasses:
AtomShape
,BioShapeCollection
,Dipoles
,FontLineShape
,Frank
,MeshCollection
,Sticks
,TextShape
Shape now encompasses:
AtomShape (abstract)
|
Balls, Dots, Ellipsoids, Halos, Labels, Polyhedra, Stars, Vectors
|
GeoSurface
BioShapeCollection (abstract)
|
Backbone, Cartoon, MeshRibbon, Ribbons, Rockets, Strands, Trace
Dipoles
FontLineShape (abstract)
|
Axes, Bbcage, Frank, Uccage
Measures
MeshCollection (abstract)
| |
Draw Isosurface
|
LcaoCartoon, MolecularOrbital, Pmesh
Sticks
|
Hsticks, Sssticks
TextShape (abstract)
|
Echo, Hover
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
static final float
int
boolean
protected float
int
shape visibility flag -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static void
void
checkBoundsMinMax
(P3 pointMin, P3 pointMax) checkObjectClicked
(int x, int y, int modifiers, BS bsVisible, boolean drawPicking) boolean
checkObjectDragged
(int prevX, int prevY, int x, int y, int dragAction, BS bsVisible) boolean
checkObjectHovered
(int x, int y, BS bsVisible) protected int
coordinateInRange
(int x, int y, T3 vertex, int dmin2, P3i ptXY) static String
encodeColor
(short colix) void
findNearestAtomIndex
(int xMouse, int yMouse, Atom[] closest, BS bsNot) static short
protected short
protected short
short
getColixI
(short colix, byte paletteID, int atomIndex) static String
getColorCommand
(String type, byte pid, short colix, boolean translucentAllowed) static String
getColorCommandUnk
(String type, short colix, boolean translucentAllowed) static String
getFontCommand
(String type, Font font) int
getIndexFromName
(String thisID) getProperty
(String property, int index) boolean
getPropertyData
(String property, Object[] data) protected boolean
getPropShape
(String property, Object[] data) abstract String
int
getSize
(int atomIndex) overridden in Dots, CGOMesh, and AtomShapeint
static String
getTranslucentLabel
(short colix) final void
initializeShape
(Viewer vwr, ModelSet modelSet, int shapeID) protected void
abstract void
void
replaceGroup
(Group g0, Group g1) void
void
setModelSet
(ModelSet modelSet) void
setModelVisibilityFlags
(BS bsModels) void
setProperties
(Object value) abstract void
setProperty
(String propertyName, Object value, BS bsSelected) protected void
void
setShapeSizeRD
(int size, RadiusData rd, BS bsSelected) protected void
protected void
setSizeRD
(RadiusData rd, BS bsSelected) boolean
wasClicked
(int x, int y)
-
Field Details
-
myType
-
RADIUS_MAX
public static final float RADIUS_MAX- See Also:
-
vwr
-
ms
-
shapeID
public int shapeID -
vf
public int vfshape visibility flag -
translucentLevel
protected float translucentLevel -
translucentAllowed
public boolean translucentAllowed -
isBioShape
public boolean isBioShape -
bsSizeSet
-
bsColixSet
-
-
Constructor Details
-
Shape
public Shape()
-
-
Method Details
-
getShapeState
-
setProperty
-
initializeShape
-
initShape
public abstract void initShape() -
setModelVisibilityFlags
- Parameters:
bsModels
-
-
getSize
public int getSize(int atomIndex) overridden in Dots, CGOMesh, and AtomShape- Parameters:
atomIndex
-- Returns:
- size
-
getSizeG
- Parameters:
group
-- Returns:
- size
-
replaceGroup
- Parameters:
g0
-g1
-
-
setModelSet
-
initModelSet
protected void initModelSet() -
setShapeSizeRD
-
setSize
- Parameters:
size
-bsSelected
-
-
setSizeRD
- Parameters:
rd
-bsSelected
-
-
setPropS
-
getPropertyData
- Parameters:
property
-data
-- Returns:
- true if serviced
-
getPropShape
-
getProperty
- Parameters:
property
-index
-- Returns:
- true if serviced
-
getIndexFromName
- Parameters:
thisID
-- Returns:
- index
-
wasClicked
public boolean wasClicked(int x, int y) - Parameters:
x
-y
-- Returns:
- T/F
-
findNearestAtomIndex
- Parameters:
xMouse
-yMouse
-closest
-bsNot
-
-
checkBoundsMinMax
- Parameters:
pointMin
-pointMax
-
-
setAtomClickability
public void setAtomClickability() -
checkObjectClicked
public Map<String,Object> checkObjectClicked(int x, int y, int modifiers, BS bsVisible, boolean drawPicking) - Parameters:
x
-y
-modifiers
-bsVisible
-drawPicking
- TODO- Returns:
- Hashtable containing information about pt clicked
-
checkObjectHovered
- Parameters:
x
-y
-bsVisible
-- Returns:
- T/F
-
checkObjectDragged
- Parameters:
prevX
-prevY
-x
-y
-dragAction
-bsVisible
-- Returns:
- T/F
-
coordinateInRange
-
getColixI
public short getColixI(short colix, byte paletteID, int atomIndex) -
getColixA
-
getColixB
-
getShapeDetail
-
getColix
-
getFontCommand
-
getColorCommandUnk
-
getColorCommand
-
encodeColor
-
getTranslucentLabel
-
appendCmd
-
setProperties
-