public abstract class Shape extends Object
Modifier and Type | Field and Description |
---|---|
BS |
bsColixSet |
BS |
bsSizeSet |
boolean |
isBioShape |
ModelSet |
ms |
String |
myType |
static float |
RADIUS_MAX |
int |
shapeID |
boolean |
translucentAllowed |
protected float |
translucentLevel |
int |
vf
shape visibility flag
|
Viewer |
vwr |
Constructor and Description |
---|
Shape() |
Modifier and Type | Method and Description |
---|---|
protected static void |
appendCmd(javajs.util.SB s,
String cmd) |
void |
checkBoundsMinMax(javajs.util.P3 pointMin,
javajs.util.P3 pointMax) |
Map<String,Object> |
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,
javajs.util.T3 vertex,
int dmin2,
javajs.util.P3i ptXY) |
static String |
encodeColor(short colix) |
void |
findNearestAtomIndex(int xMouse,
int yMouse,
Atom[] closest,
BS bsNot) |
static short |
getColix(short[] colixes,
int i,
Atom atom) |
protected short |
getColixA(short colix,
byte paletteID,
Atom atom) |
protected short |
getColixB(short colix,
int pid,
Bond bond) |
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,
javajs.awt.Font font) |
int |
getIndexFromName(String thisID) |
Object |
getProperty(String property,
int index) |
boolean |
getPropertyData(String property,
Object[] data) |
protected boolean |
getPropShape(String property,
Object[] data) |
Object |
getShapeDetail() |
abstract String |
getShapeState() |
int |
getSize(int atomIndex)
overridden in Dots, CGOMesh, and AtomShape
|
int |
getSizeG(Group group) |
static String |
getTranslucentLabel(short colix) |
void |
initializeShape(Viewer vwr,
ModelSet modelSet,
int shapeID) |
protected void |
initModelSet() |
abstract void |
initShape() |
void |
replaceGroup(Group g0,
Group g1) |
void |
setAtomClickability() |
void |
setModelSet(ModelSet modelSet) |
void |
setModelVisibilityFlags(BS bsModels) |
abstract void |
setProperty(String propertyName,
Object value,
BS bsSelected) |
protected void |
setPropS(String propertyName,
Object value,
BS bsSelected) |
void |
setShapeSizeRD(int size,
RadiusData rd,
BS bsSelected) |
protected void |
setSize(int size,
BS bsSelected) |
protected void |
setSizeRD(RadiusData rd,
BS bsSelected) |
boolean |
wasClicked(int x,
int y) |
public String myType
public static final float RADIUS_MAX
public Viewer vwr
public ModelSet ms
public int shapeID
public int vf
protected float translucentLevel
public boolean translucentAllowed
public boolean isBioShape
public BS bsSizeSet
public BS bsColixSet
public abstract String getShapeState()
public abstract void initShape()
public void setModelVisibilityFlags(BS bsModels)
bsModels
- public int getSize(int atomIndex)
atomIndex
- public int getSizeG(Group group)
group
- public void setModelSet(ModelSet modelSet)
protected void initModelSet()
public void setShapeSizeRD(int size, RadiusData rd, BS bsSelected)
protected void setSize(int size, BS bsSelected)
size
- bsSelected
- protected void setSizeRD(RadiusData rd, BS bsSelected)
rd
- bsSelected
- public boolean getPropertyData(String property, Object[] data)
property
- data
- public Object getProperty(String property, int index)
property
- index
- public int getIndexFromName(String thisID)
thisID
- public boolean wasClicked(int x, int y)
x
- y
- public void findNearestAtomIndex(int xMouse, int yMouse, Atom[] closest, BS bsNot)
xMouse
- yMouse
- closest
- bsNot
- public void checkBoundsMinMax(javajs.util.P3 pointMin, javajs.util.P3 pointMax)
pointMin
- pointMax
- public void setAtomClickability()
public Map<String,Object> checkObjectClicked(int x, int y, int modifiers, BS bsVisible, boolean drawPicking)
x
- y
- modifiers
- bsVisible
- drawPicking
- TODOpublic boolean checkObjectHovered(int x, int y, BS bsVisible)
x
- y
- bsVisible
- public boolean checkObjectDragged(int prevX, int prevY, int x, int y, int dragAction, BS bsVisible)
prevX
- prevY
- x
- y
- dragAction
- bsVisible
- protected int coordinateInRange(int x, int y, javajs.util.T3 vertex, int dmin2, javajs.util.P3i ptXY)
public short getColixI(short colix, byte paletteID, int atomIndex)
protected short getColixA(short colix, byte paletteID, Atom atom)
protected short getColixB(short colix, int pid, Bond bond)
public Object getShapeDetail()
public static short getColix(short[] colixes, int i, Atom atom)
public static String getColorCommandUnk(String type, short colix, boolean translucentAllowed)
public static String getColorCommand(String type, byte pid, short colix, boolean translucentAllowed)
public static String encodeColor(short colix)
public static String getTranslucentLabel(short colix)
protected static void appendCmd(javajs.util.SB s, String cmd)