From: <ha...@us...> - 2006-10-11 03:26:53
|
Revision: 5906 http://svn.sourceforge.net/jmol/?rev=5906&view=rev Author: hansonr Date: 2006-10-10 20:26:45 -0700 (Tue, 10 Oct 2006) Log Message: ----------- fix for programmatically delivering isosurface map data Modified Paths: -------------- trunk/Jmol/src/org/jmol/viewer/Eval.java trunk/Jmol/src/org/jmol/viewer/Isosurface.java Modified: trunk/Jmol/src/org/jmol/viewer/Eval.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Eval.java 2006-10-11 03:06:46 UTC (rev 5905) +++ trunk/Jmol/src/org/jmol/viewer/Eval.java 2006-10-11 03:26:45 UTC (rev 5906) @@ -5510,7 +5510,6 @@ break; case Token.string: propertyName = surfaceObjectSeen || planeSeen ? "mapColor" : "getSurface"; - surfaceObjectSeen = true; /* * a file name, optionally followed by an integer file index. * OR empty. In that case, if the model auxiliary info has the @@ -5529,10 +5528,12 @@ propertyValue = viewer.getModelAuxiliaryInfo(modelIndex, "jmolMappedDataInfo"); if (propertyValue == null) propertyValue = viewer.getModelAuxiliaryInfo(modelIndex, "jmolSurfaceInfo"); + surfaceObjectSeen = true; if (propertyValue != null) break; filename = viewer.getFullPathName(); } + surfaceObjectSeen = true; if (i + 1 < statementLength && statement[i + 1].tok == Token.integer) viewer.setShapeProperty(JmolConstants.SHAPE_ISOSURFACE, "fileIndex", new Integer(intParameter(++i))); Modified: trunk/Jmol/src/org/jmol/viewer/Isosurface.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Isosurface.java 2006-10-11 03:06:46 UTC (rev 5905) +++ trunk/Jmol/src/org/jmol/viewer/Isosurface.java 2006-10-11 03:26:45 UTC (rev 5906) @@ -4840,8 +4840,11 @@ void setupSurfaceInfo() { volumetricOrigin.set((Point3f)surfaceInfo.get("volumetricOrigin")); Vector3f[] v = (Vector3f[])surfaceInfo.get("volumetricVectors"); - for (int i = 0; i < 3; i++) + for (int i = 0; i < 3; i++) { volumetricVectors[i].set(v[i]); + volumetricVectorLengths[i] = volumetricVectors[i].length(); + unitVolumetricVectors[i].normalize(volumetricVectors[i]); + } int[] counts = (int[])surfaceInfo.get("voxelCounts"); for (int i = 0; i < 3; i++) voxelCounts[i] = counts[i]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |