Revision: 18326 http://sourceforge.net/p/jmol/code/18326 Author: hansonr Date: 2013-06-13 22:44:57 +0000 (Thu, 13 Jun 2013) Log Message: ----------- ___version=13.0.17_dev_2013.06.13
bug fix: draw ARROW ATOM/BOND broken bug fix: draw ARROW with offset disallows set picking draw adjustments Modified Paths: -------------- branches/v13_0/Jmol/src/org/jmol/shapespecial/Draw.java branches/v13_0/Jmol/src/org/jmol/shapespecial/DrawMesh.java branches/v13_0/Jmol/src/org/jmol/shapespecial/DrawRenderer.java branches/v13_0/Jmol/src/org/jmol/viewer/Jmol.properties Modified: branches/v13_0/Jmol/src/org/jmol/shapespecial/Draw.java =================================================================== --- branches/v13_0/Jmol/src/org/jmol/shapespecial/Draw.java 2013-06-12 14:46:38 UTC (rev 18325) +++ branches/v13_0/Jmol/src/org/jmol/shapespecial/Draw.java 2013-06-13 22:44:57 UTC (rev 18326) @@ -1018,11 +1018,11 @@ * have to watch out for double-listed vertices * */ - if (newScale == 0 || mesh.vertexCount == 0 || mesh.scale == newScale) + if (newScale == 0 || mesh.vertexCount == 0 && mesh.connections == null || mesh.scale == newScale) return; float f = newScale / mesh.scale; mesh.scale = newScale; - if (mesh.haveXyPoints || mesh.drawType == EnumDrawType.ARC || mesh.drawType == EnumDrawType.CIRCLE || mesh.drawType == EnumDrawType.CIRCULARPLANE) + if (mesh.haveXyPoints || mesh.connections != null || mesh.drawType == EnumDrawType.ARC || mesh.drawType == EnumDrawType.CIRCLE || mesh.drawType == EnumDrawType.CIRCULARPLANE) return; // done in renderer Vector3f diff = new Vector3f(); int iptlast = -1; @@ -1206,7 +1206,7 @@ } Point3f pt = new Point3f(); int ptVertex = vertexes[iVertex]; - Point3f coord = new Point3f(mesh.vertices[ptVertex]); + Point3f coord = new Point3f(mesh.altVertices == null ? mesh.vertices[ptVertex] : (Point3f) mesh.altVertices[ptVertex]); Point3f newcoord = new Point3f(); Vector3f move = new Vector3f(); viewer.transformPoint(coord, pt); @@ -1269,7 +1269,9 @@ for (int iVertex = (m.isTriangleSet ? 3 : m.polygonIndexes[iModel].length); --iVertex >= 0;) { try { - Point3f pt = m.vertices[m.polygonIndexes[iModel][iVertex]]; + int iv = m.polygonIndexes[iModel][iVertex]; + Point3f pt = (m.altVertices == null ? m.vertices[iv] + : (Point3f) m.altVertices[iv]); int d2 = coordinateInRange(x, y, pt, dmin2, ptXY); if (d2 >= 0) { pickedMesh = m; @@ -1326,7 +1328,7 @@ else if (mesh.isBarb) str.append(" barb"); if (mesh.scale != 1 - && (mesh.haveXyPoints || mesh.drawType == EnumDrawType.CIRCLE || mesh.drawType == EnumDrawType.ARC)) + && (mesh.haveXyPoints || mesh.connections != null || mesh.drawType == EnumDrawType.CIRCLE || mesh.drawType == EnumDrawType.ARC)) str.append(" scale ").append(mesh.scale); if (mesh.width != 0) str.append(" diameter ").append( Modified: branches/v13_0/Jmol/src/org/jmol/shapespecial/DrawMesh.java =================================================================== --- branches/v13_0/Jmol/src/org/jmol/shapespecial/DrawMesh.java 2013-06-12 14:46:38 UTC (rev 18325) +++ branches/v13_0/Jmol/src/org/jmol/shapespecial/DrawMesh.java 2013-06-13 22:44:57 UTC (rev 18326) @@ -52,7 +52,6 @@ int[] drawVertexCounts; boolean isFixed; boolean isVector; - float drawArrowScale; boolean noHead; boolean isBarb; Modified: branches/v13_0/Jmol/src/org/jmol/shapespecial/DrawRenderer.java =================================================================== --- branches/v13_0/Jmol/src/org/jmol/shapespecial/DrawRenderer.java 2013-06-12 14:46:38 UTC (rev 18325) +++ branches/v13_0/Jmol/src/org/jmol/shapespecial/DrawRenderer.java 2013-06-13 22:44:57 UTC (rev 18326) @@ -292,9 +292,12 @@ for (int i = 0; i < 4; i++) viewer.transformPoint(vertices[i], screens[i]); - float f = 1; // bendiness + float f = 4 * getArrowScale(); // bendiness float endoffset = 0.2f; - float offsetside = 10 * width; + float offsetside = (width == 0 ? 0.1f : width); + //float f = 1; // bendiness + //float endoffset = 0.2f; + //float offsetside = 10 * width; vpt0.set(screens[0].x, screens[0].y, screens[0].z); vpt1.set(screens[1].x, screens[1].y, screens[1].z); @@ -371,11 +374,7 @@ boolean isBarb) { if (dmesh.noHead) return; - float fScale = dmesh.drawArrowScale; - if (fScale == 0) - fScale = viewer.getDefaultDrawArrowScale() * (dmesh.connections == null ? 1f : 0.5f); - if (fScale <= 0) - fScale = 0.5f; + float fScale = getArrowScale(); if (isTransformed) fScale *= 40; if (factor2 > 0) @@ -422,6 +421,15 @@ g3d.fillCylinderScreen(Graphics3D.ENDCAPS_OPENEND, diameter, pt0i, pt1i); } + private float getArrowScale() { + float fScale = dmesh.scale; + if (fScale == 0) + fScale = viewer.getDefaultDrawArrowScale() * (dmesh.connections == null ? 1f : 0.5f); + if (fScale <= 0) + fScale = 0.5f; + return fScale; + } + private final BitSet bsHandles = new BitSet(); private void renderHandles() { Modified: branches/v13_0/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- branches/v13_0/Jmol/src/org/jmol/viewer/Jmol.properties 2013-06-12 14:46:38 UTC (rev 18325) +++ branches/v13_0/Jmol/src/org/jmol/viewer/Jmol.properties 2013-06-13 22:44:57 UTC (rev 18326) @@ -9,8 +9,10 @@ # Don't use ___ in your text, as that is the key for stripping out # the information saved in the JAR version of this file. -___version=13.0.17_dev_2013.06.12 +___version=13.0.17_dev_2013.06.13 +bug fix: draw ARROW ATOM/BOND broken +bug fix: draw ARROW with offset disallows set picking draw adjustments bug fix: concurrrent loading of two cif files by two different applets fails bug fix: draw LINEDATA not operative (undocumented, for state; from draw xxx INTERSECT yyy) bug fix: jvxl reader ignores jvxlVertexColorData This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Jmol-commits mailing list Jmol-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-commits