From: <ha...@us...> - 2006-10-13 01:07:31
|
Revision: 5928 http://svn.sourceforge.net/jmol/?rev=5928&view=rev Author: hansonr Date: 2006-10-12 18:07:25 -0700 (Thu, 12 Oct 2006) Log Message: ----------- faulty logic in meshribbon/hide Modified Paths: -------------- trunk/Jmol/src/org/jmol/viewer/MeshRibbonRenderer.java Modified: trunk/Jmol/src/org/jmol/viewer/MeshRibbonRenderer.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/MeshRibbonRenderer.java 2006-10-12 17:25:19 UTC (rev 5927) +++ trunk/Jmol/src/org/jmol/viewer/MeshRibbonRenderer.java 2006-10-13 01:07:25 UTC (rev 5928) @@ -120,11 +120,12 @@ void render1Strand(int monomerCount, Monomer[] monomers, short[] mads, short[] colixes, Point3i[] screens) { - for (int i = monomerCount; --i >= 0; ) { + for (int i = monomerCount; --i >= 0;) { if ((monomers[i].shapeVisibilityFlags & myVisibilityFlag) == 0 || frame.bsHidden.get(monomers[i].getLeadAtomIndex())) - render1StrandSegment(monomerCount, - monomers[i], colixes[i], mads, screens, i); + continue; + render1StrandSegment(monomerCount, monomers[i], colixes[i], mads, + screens, i); } } @@ -142,18 +143,17 @@ void render2Strand(int monomerCount, Monomer[] monomers, short[] mads, short[] colixes, Point3i[] ribbonTopScreens, Point3i[] ribbonBottomScreens) { - for (int i = monomerCount; --i >= 0; ) - if (mads[i] > 0) - render2StrandSegment(monomerCount, - monomers[i], colixes[i], mads, - ribbonTopScreens, ribbonBottomScreens, i); + for (int i = monomerCount; --i >= 0;) { + if (mads[i] == 0 || frame.bsHidden.get(monomers[i].getLeadAtomIndex())) + continue; + render2StrandSegment(monomerCount, monomers[i], colixes[i], mads, + ribbonTopScreens, ribbonBottomScreens, i); + } } void render2StrandSegment(int monomerCount, Monomer monomer, short colix, short[] mads, Point3i[] ribbonTopScreens, Point3i[] ribbonBottomScreens, int i) { - if (frame.bsHidden.get(monomer.getLeadAtomIndex())) - return; int iLast = monomerCount; int iPrev = i - 1; if (iPrev < 0) iPrev = 0; int iNext = i + 1; if (iNext > iLast) iNext = iLast; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |