From: <ha...@us...> - 2013-04-16 15:57:40
|
Revision: 18116 http://sourceforge.net/p/jmol/code/18116 Author: hansonr Date: 2013-04-16 15:57:35 +0000 (Tue, 16 Apr 2013) Log Message: ----------- cartoon hermite fix Modified Paths: -------------- trunk/Jmol/src/org/jmol/renderbio/BioShapeRenderer.java Modified: trunk/Jmol/src/org/jmol/renderbio/BioShapeRenderer.java =================================================================== --- trunk/Jmol/src/org/jmol/renderbio/BioShapeRenderer.java 2013-04-16 13:18:50 UTC (rev 18115) +++ trunk/Jmol/src/org/jmol/renderbio/BioShapeRenderer.java 2013-04-16 15:57:35 UTC (rev 18116) @@ -557,8 +557,7 @@ // parameters: - int hermiteLevel = (cartoonsFancy ? Math.max(this.hermiteLevel, 5) : this.hermiteLevel); - int nHermites = (hermiteLevel + 1) * 2 + 1; // 4 for hermiteLevel = 1; 13 for hermitelevel 5 + int nHermites = (hermiteLevel + 1) * 2 + 1; // 5 for hermiteLevel = 1; 13 for hermitelevel 5 int nPer = (isFlatMesh ? 4 : (hermiteLevel + 1) * 4 - 2); // 6 for hermiteLevel 1; 22 for hermiteLevel 5 float angle = (float) ((isFlatMesh ? Math.PI / (nPer - 1) : 2 * Math.PI / nPer)); @@ -739,6 +738,7 @@ V3[] normals2 = meshes[iNext].getNormalsTemp(); V3[] normals = meshes[i].getNormalsTemp(); int normixCount = normals.length; + if (doCap0) normixCount -= nPer; for (int j = 1; j <= nPer; ++j) { norml.add2(normals[normixCount - j], normals2[nPer - j]); norml.normalize(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |