Package org.jmol.shapespecial
Class Draw
- java.lang.Object
-
- org.jmol.shape.Shape
-
- org.jmol.shape.MeshCollection
-
- org.jmol.shapespecial.Draw
-
public class Draw extends MeshCollection
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDraw.EnumDrawType
-
Field Summary
Fields Modifier and Type Field Description private javajs.util.P3[]boundBoxprivate BSbsAllModelsprivate intdiameter(package private) DrawMesh[]dmeshesprivate intindicatedModelIndexprivate java.lang.StringintersectIDprivate booleanisArcprivate booleanisArrowprivate booleanisBarbprivate booleanisCircleprivate booleanisCrossedprivate booleanisCurveprivate booleanisCylinderprivate booleanisLineprivate booleanisPerpendicularprivate booleanisPlaneprivate booleanisReversedprivate booleanisRotated45private booleanisValidprivate booleanisVectorprivate booleanisVerticesprivate floatlengthprivate javajs.util.Lst<javajs.util.P3[]>lineDataprivate booleanmakePointsprivate static intMAX_OBJECT_CLICK_DISTANCE_SQUAREDprivate int[]modelInfoprivate floatnewScaleprivate booleannoHeadprivate intnPointsprivate javajs.util.V3offsetprivate javajs.util.P4planeprivate javajs.util.Lst<java.lang.Object>polygonprivate static intPT_BITSETprivate static intPT_COORDprivate static intPT_IDENTIFIERprivate static intPT_MODEL_BASED_POINTSprivate static intPT_MODEL_INDEXprivate javajs.util.P3[]ptListprivate javajs.util.P3iptXY(package private) MeshSurfaceslabDataprivate DrawMeshthisMeshprivate javajs.util.V3vABprivate javajs.util.Lst<java.lang.Object[]>vDataprivate floatwidth-
Fields inherited from class org.jmol.shape.MeshCollection
bsDisplay, colix, color, connections, currentMesh, displayWithinDistance2, displayWithinPoints, explicitID, htObjects, isDisplayWithinNot, isFixed, linkedMesh, meshCount, meshes, modelIndex, nUnnamed, pickedMesh, pickedModel, pickedPt, pickedVertex, PREVIOUS_MESH_ID, previousMeshID, title
-
Fields inherited from class org.jmol.shape.Shape
bsColixSet, bsSizeSet, isBioShape, ms, myType, RADIUS_MAX, shapeID, translucentAllowed, translucentLevel, vf, vwr
-
-
Constructor Summary
Constructors Constructor Description Draw()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidaddPoint(javajs.util.T3 newPt, int iModel)private voidaddPoints(int type, java.lang.Object value)voidallocMesh(java.lang.String thisID, Mesh m)java.util.Map<java.lang.String,java.lang.Object>checkObjectClicked(int x, int y, int action, BS bsVisible, boolean drawPicking)booleancheckObjectDragged(int prevX, int prevY, int x, int y, int dragAction, BS bsVisible)booleancheckObjectHovered(int x, int y, BS bsVisible)protected voidclean()private voiddeleteMeshElement(int i)private voiddeleteModels(int modelIndex)private booleanfindPickedObject(int x, int y, boolean isPicking, BS bsVisible)private java.lang.StringgetCommand(Mesh mesh)private java.lang.StringgetCommand2(Mesh mesh, int iModel)java.lang.ObjectgetProperty(java.lang.String property, int index)booleangetPropertyData(java.lang.String property, java.lang.Object[] data)java.lang.ObjectgetShapeDetail()java.lang.StringgetShapeState()private javajs.util.V3getSpinAxis(java.lang.String axisID, int modelIndex)private javajs.util.T3getSpinCenter(java.lang.String axisID, int vertexIndex, int modelIndex)private static java.lang.StringgetVertexList(DrawMesh mesh, int iModel, int nVertices)private voidinitDraw()voidinitShape()static booleanisPolygonDisplayable(Mesh mesh, int i)private voidmove2D(DrawMesh mesh, int[] vertexes, int iVertex, int x, int y, boolean moveAll)static javajs.util.P3randomPoint()private voidscale(Mesh mesh, float newScale)private static voidsetAxes(DrawMesh m)private booleansetDrawing(int[] connections)voidsetModelVisibilityFlags(BS bsModels)private booleansetPoints(int iModel, int n)private voidsetPolygon(int nPoly)voidsetProperty(java.lang.String propertyName, java.lang.Object value, BS bs)private voidsetPropertySuper(java.lang.String propertyName, java.lang.Object value, BS bs)-
Methods inherited from class org.jmol.shape.MeshCollection
checkExplicit, deleteMeshI, deleteMeshKey, getIndexFromName, getMesh, getMeshList, getPickedPoint, getPropDataMC, getPropMC, merge, resetObjects, setPropMC, setStatusPicked, setTokenProperty
-
Methods inherited from class org.jmol.shape.Shape
appendCmd, checkBoundsMinMax, coordinateInRange, encodeColor, findNearestAtomIndex, getColix, getColixA, getColixB, getColixI, getColorCommand, getColorCommandUnk, getFontCommand, getPropShape, getSize, getSizeG, getTranslucentLabel, initializeShape, initModelSet, replaceGroup, setAtomClickability, setModelSet, setPropS, setShapeSizeRD, setSize, setSizeRD, wasClicked
-
-
-
-
Field Detail
-
dmeshes
DrawMesh[] dmeshes
-
thisMesh
private DrawMesh thisMesh
-
ptList
private javajs.util.P3[] ptList
-
offset
private javajs.util.V3 offset
-
nPoints
private int nPoints
-
diameter
private int diameter
-
width
private float width
-
newScale
private float newScale
-
length
private float length
-
isCurve
private boolean isCurve
-
isArc
private boolean isArc
-
isArrow
private boolean isArrow
-
isLine
private boolean isLine
-
isVector
private boolean isVector
-
isCircle
private boolean isCircle
-
isPerpendicular
private boolean isPerpendicular
-
isCylinder
private boolean isCylinder
-
isVertices
private boolean isVertices
-
isPlane
private boolean isPlane
-
isReversed
private boolean isReversed
-
isRotated45
private boolean isRotated45
-
isCrossed
private boolean isCrossed
-
isValid
private boolean isValid
-
noHead
private boolean noHead
-
isBarb
private boolean isBarb
-
indicatedModelIndex
private int indicatedModelIndex
-
modelInfo
private int[] modelInfo
-
makePoints
private boolean makePoints
-
plane
private javajs.util.P4 plane
-
bsAllModels
private BS bsAllModels
-
polygon
private javajs.util.Lst<java.lang.Object> polygon
-
vData
private javajs.util.Lst<java.lang.Object[]> vData
-
intersectID
private java.lang.String intersectID
-
boundBox
private javajs.util.P3[] boundBox
-
lineData
private javajs.util.Lst<javajs.util.P3[]> lineData
-
PT_COORD
private static final int PT_COORD
- See Also:
- Constant Field Values
-
PT_IDENTIFIER
private static final int PT_IDENTIFIER
- See Also:
- Constant Field Values
-
PT_BITSET
private static final int PT_BITSET
- See Also:
- Constant Field Values
-
PT_MODEL_INDEX
private static final int PT_MODEL_INDEX
- See Also:
- Constant Field Values
-
PT_MODEL_BASED_POINTS
private static final int PT_MODEL_BASED_POINTS
- See Also:
- Constant Field Values
-
slabData
MeshSurface slabData
-
vAB
private final javajs.util.V3 vAB
-
MAX_OBJECT_CLICK_DISTANCE_SQUARED
private static final int MAX_OBJECT_CLICK_DISTANCE_SQUARED
- See Also:
- Constant Field Values
-
ptXY
private final javajs.util.P3i ptXY
-
-
Method Detail
-
allocMesh
public void allocMesh(java.lang.String thisID, Mesh m)- Overrides:
allocMeshin classMeshCollection
-
setPropertySuper
private void setPropertySuper(java.lang.String propertyName, java.lang.Object value, BS bs)
-
initShape
public void initShape()
- Overrides:
initShapein classMeshCollection
-
setProperty
public void setProperty(java.lang.String propertyName, java.lang.Object value, BS bs)- Specified by:
setPropertyin classShape
-
addPoints
private void addPoints(int type, java.lang.Object value)
-
deleteModels
private void deleteModels(int modelIndex)
-
deleteMeshElement
private void deleteMeshElement(int i)
-
initDraw
private void initDraw()
-
getPropertyData
public boolean getPropertyData(java.lang.String property, java.lang.Object[] data)- Overrides:
getPropertyDatain classShape- Returns:
- true if serviced
-
getProperty
public java.lang.Object getProperty(java.lang.String property, int index)- Overrides:
getPropertyin classShape- Returns:
- true if serviced
-
getSpinCenter
private javajs.util.T3 getSpinCenter(java.lang.String axisID, int vertexIndex, int modelIndex)
-
getSpinAxis
private javajs.util.V3 getSpinAxis(java.lang.String axisID, int modelIndex)
-
setDrawing
private boolean setDrawing(int[] connections)
-
clean
protected void clean()
- Overrides:
cleanin classMeshCollection
-
addPoint
private void addPoint(javajs.util.T3 newPt, int iModel)
-
setPoints
private boolean setPoints(int iModel, int n)
-
setPolygon
private void setPolygon(int nPoly)
-
scale
private void scale(Mesh mesh, float newScale)
-
setAxes
private static final void setAxes(DrawMesh m)
-
setModelVisibilityFlags
public void setModelVisibilityFlags(BS bsModels)
- Overrides:
setModelVisibilityFlagsin classMeshCollection
-
checkObjectClicked
public java.util.Map<java.lang.String,java.lang.Object> checkObjectClicked(int x, int y, int action, BS bsVisible, boolean drawPicking)- Overrides:
checkObjectClickedin classShapedrawPicking- TODO- Returns:
- Hashtable containing information about pt clicked
-
checkObjectHovered
public boolean checkObjectHovered(int x, int y, BS bsVisible)- Overrides:
checkObjectHoveredin classShape- Returns:
- T/F
-
checkObjectDragged
public boolean checkObjectDragged(int prevX, int prevY, int x, int y, int dragAction, BS bsVisible)- Overrides:
checkObjectDraggedin classShape- Returns:
- T/F
-
move2D
private void move2D(DrawMesh mesh, int[] vertexes, int iVertex, int x, int y, boolean moveAll)
-
findPickedObject
private boolean findPickedObject(int x, int y, boolean isPicking, BS bsVisible)- Parameters:
x-y-isPicking- IGNOREDbsVisible-- Returns:
- true if found
-
getCommand
private java.lang.String getCommand(Mesh mesh)
-
getCommand2
private java.lang.String getCommand2(Mesh mesh, int iModel)
-
isPolygonDisplayable
public static boolean isPolygonDisplayable(Mesh mesh, int i)
-
getVertexList
private static java.lang.String getVertexList(DrawMesh mesh, int iModel, int nVertices)
-
getShapeDetail
public java.lang.Object getShapeDetail()
- Overrides:
getShapeDetailin classShape
-
getShapeState
public java.lang.String getShapeState()
- Specified by:
getShapeStatein classShape
-
randomPoint
public static javajs.util.P3 randomPoint()
-
-