From: Miguel <mig...@us...> - 2005-04-26 15:29:44
|
Update of /cvsroot/jmol/Jmol/src/org/jmol/g3d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23673/src/org/jmol/g3d Modified Files: Graphics3D.java Hermite3D.java Log Message: removed borders from cartoons and ribbons Index: Graphics3D.java =================================================================== RCS file: /cvsroot/jmol/Jmol/src/org/jmol/g3d/Graphics3D.java,v retrieving revision 1.60 retrieving revision 1.61 diff -u -r1.60 -r1.61 --- Graphics3D.java 22 Feb 2005 01:35:50 -0000 1.60 +++ Graphics3D.java 26 Apr 2005 15:29:34 -0000 1.61 @@ -1168,10 +1168,12 @@ hermite3d.render(false, colix, tension, 0, 0, 0, s0, s1, s2, s3); } - public void drawHermite(boolean fill, short colix, int tension, + public void drawHermite(boolean fill, boolean border, + short colix, int tension, Point3i s0, Point3i s1, Point3i s2, Point3i s3, Point3i s4, Point3i s5, Point3i s6, Point3i s7) { - hermite3d.render2(fill, colix, tension, s0, s1, s2, s3, s4, s5, s6, s7); + hermite3d.render2(fill, border, colix, tension, + s0, s1, s2, s3, s4, s5, s6, s7); } public void fillRect(short colix, Index: Hermite3D.java =================================================================== RCS file: /cvsroot/jmol/Jmol/src/org/jmol/g3d/Hermite3D.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- Hermite3D.java 9 Jan 2005 03:14:56 -0000 1.16 +++ Hermite3D.java 26 Apr 2005 15:29:35 -0000 1.17 @@ -147,19 +147,23 @@ } while (sp >= 0); } - public void render2x(boolean fill, short colix, int tension, - Point3i p0, Point3i p1, Point3i p2, Point3i p3,//top strand segment - Point3i p4, Point3i p5, Point3i p6, Point3i p7) {//bottom strand segment + void render2x(boolean fill, short colix, int tension, + //top strand segment + Point3i p0, Point3i p1, Point3i p2, Point3i p3, + //bottom strand segment + Point3i p4, Point3i p5, Point3i p6, Point3i p7) { Point3i[] endPoints = {p2, p1, p6, p5}; - Vector points = new Vector(10); // stores all points for top+bottom strands of 1 segment + // stores all points for top+bottom strands of 1 segment + Vector points = new Vector(10); int whichPoint = 0; int numTopStrandPoints = 2; //first and last points automatically included float numPointsPerSegment = 5.0f;//use 5 for mesh + // could make it so you can set this from script command if (fill) - numPointsPerSegment = 10.0f; // could make it so you can set this from script command + numPointsPerSegment = 10.0f; float interval = (1.0f / numPointsPerSegment); @@ -286,9 +290,11 @@ p3f.z = p3i.z; } - public void render2(boolean fill, short colix, int tension, - Point3i p0, Point3i p1, Point3i p2, Point3i p3,//top strand segment - Point3i p4, Point3i p5, Point3i p6, Point3i p7) {//bottom strand segment + public void render2(boolean fill, boolean border, short colix, int tension, + //top strand segment + Point3i p0, Point3i p1, Point3i p2, Point3i p3, + //bottom strand segment + Point3i p4, Point3i p5, Point3i p6, Point3i p7) { if (! fill) { render2x(fill, colix, tension, p0, p1, p2, p3, p4, p5, p6, p7); @@ -343,8 +349,10 @@ double dyBot = d.y - c.y; double dyBot2 = dyBot * dyBot; if (dyBot2 < 8) { - g3d.fillSphereCentered(colix, 3, a); - g3d.fillSphereCentered(colix, 3, c); + if (border) { + g3d.fillSphereCentered(colix, 3, a); + g3d.fillSphereCentered(colix, 3, c); + } if (needToFill[sp]) { g3d.fillQuadrilateral(colix, a, b, d, c); |