From: <ha...@us...> - 2008-11-15 21:16:52
|
Revision: 10330 http://jmol.svn.sourceforge.net/jmol/?rev=10330&view=rev Author: hansonr Date: 2008-11-15 21:16:49 +0000 (Sat, 15 Nov 2008) Log Message: ----------- 11.7.12 VERSION - code efficiencies # code: pmesh now a subclass of isosurface, with org.jmol.jvxl.PmeshReader doing the work. # new feature: all options of isosurface now option for pmesh. # all pmesh command does is guarantee that if the pmesh data is standard pmesh ASCII data, # then it will be read correctly. Binary pmesh files may be read with isosurface command. # new feature: pmesh files and inline scripts now can be colored and saved as JVXL files # new feature: isosurface INLINE "--pmesh data--" Modified Paths: -------------- trunk/Jmol/src/org/jmol/shape/Shape.java trunk/Jmol/src/org/jmol/shape/ShapeRenderer.java trunk/Jmol/src/org/jmol/shapesurface/Isosurface.java Removed Paths: ------------- trunk/Jmol/src/org/jmol/shapesurface/MeshFileCollection.java Modified: trunk/Jmol/src/org/jmol/shape/Shape.java =================================================================== --- trunk/Jmol/src/org/jmol/shape/Shape.java 2008-11-15 20:54:46 UTC (rev 10329) +++ trunk/Jmol/src/org/jmol/shape/Shape.java 2008-11-15 21:16:49 UTC (rev 10330) @@ -40,38 +40,37 @@ import java.util.Hashtable; /** - * After code reorganization of 11/2006 (BH) Shape now encompasses: + * Shape now encompasses: * - * AtomShape + * AtomShape (abstract) * | - * Balls, Dots, Halos, Labels, Polyhedra, Stars, Vectors + * Balls, Dots, Ellipsoids, Halos, Labels, Polyhedra, Stars, Vectors * | * GeoSurface * - * Dipoles, Measures + * BioShapeCollection (abstract) + * | + * Backbone, Cartoon, MeshRibbon, Ribbons, Rockets, Strands, Trace * - * FontLineShape + * Dipoles + * + * FontLineShape (abstract) * | * Axes, Bbcage, Frank, Uccage * - * MeshCollection + * Measures + * + * MeshCollection (abstract) * | | - * Draw MeshFileCollection (adds parser code) - * | | - * Pmesh IsosurfaceMeshCollection (adds JVXL code) - * | - * Isosurface - * |________ LcaoCartoon, MolecularOrbital + * Draw Isosurface + * | + * LcaoCartoon, MolecularOrbital, Pmesh * - * BioShapeCollection - * | - * Backbone, Cartoon, MeshRibbon, Ribbons, Rockets, Strands, Trace - * * Sticks * | * Hsticks, Sssticks * - * TextShape + * TextShape (abstract) * | * Echo, Hover * Modified: trunk/Jmol/src/org/jmol/shape/ShapeRenderer.java =================================================================== --- trunk/Jmol/src/org/jmol/shape/ShapeRenderer.java 2008-11-15 20:54:46 UTC (rev 10329) +++ trunk/Jmol/src/org/jmol/shape/ShapeRenderer.java 2008-11-15 21:16:49 UTC (rev 10330) @@ -31,7 +31,6 @@ import org.jmol.modelset.ModelSet; import org.jmol.viewer.JmolConstants; import org.jmol.viewer.Viewer; -//import java.awt.Rectangle; public abstract class ShapeRenderer { @@ -41,7 +40,6 @@ protected Viewer viewer; protected JmolRendererInterface g3d; - //Rectangle rectClip; //not implemented protected ModelSet modelSet; protected Shape shape; @@ -61,7 +59,7 @@ this.isGenerator = isGenerator; } - public short getMad(int which) { + public short getMad(int which) { switch (which) { case 1: return madBeg; @@ -84,9 +82,8 @@ protected void initRenderer() { } - public void render(JmolRendererInterface g3d, ModelSet modelSet, Shape shape) { //, Rectangle rectClip + public void render(JmolRendererInterface g3d, ModelSet modelSet, Shape shape) { this.g3d = g3d; - //this.rectClip = rectClip; //not implemented -- could be a place for optimization this.modelSet = modelSet; this.shape = shape; render(); Modified: trunk/Jmol/src/org/jmol/shapesurface/Isosurface.java =================================================================== --- trunk/Jmol/src/org/jmol/shapesurface/Isosurface.java 2008-11-15 20:54:46 UTC (rev 10329) +++ trunk/Jmol/src/org/jmol/shapesurface/Isosurface.java 2008-11-15 21:16:49 UTC (rev 10330) @@ -93,6 +93,7 @@ package org.jmol.shapesurface; import org.jmol.shape.Mesh; +import org.jmol.shape.MeshCollection; import org.jmol.util.BitSetUtil; import org.jmol.util.Escape; import org.jmol.util.Logger; @@ -121,7 +122,7 @@ import org.jmol.jvxl.data.MeshData; import org.jmol.jvxl.readers.SurfaceGenerator; -public class Isosurface extends MeshFileCollection implements MeshDataServer { +public class Isosurface extends MeshCollection implements MeshDataServer { private IsosurfaceMesh[] isomeshes = new IsosurfaceMesh[4]; private IsosurfaceMesh thisMesh; Deleted: trunk/Jmol/src/org/jmol/shapesurface/MeshFileCollection.java =================================================================== --- trunk/Jmol/src/org/jmol/shapesurface/MeshFileCollection.java 2008-11-15 20:54:46 UTC (rev 10329) +++ trunk/Jmol/src/org/jmol/shapesurface/MeshFileCollection.java 2008-11-15 21:16:49 UTC (rev 10330) @@ -1,73 +0,0 @@ -/* $RCSfile$ - * $Author: hansonr $ - * $Date: 2007-02-09 09:51:59 -0600 (Fri, 09 Feb 2007) $ - * $Revision: 6742 $ - * - * Copyright (C) 2002-2005 The Jmol Development Team - * - * Contact: jmo...@li... - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -package org.jmol.shapesurface; - -import org.jmol.shape.MeshCollection; -import org.jmol.util.Parser; - -public abstract class MeshFileCollection extends MeshCollection { - - - protected String line; - protected int[] next = new int[1]; - - - protected String[] getTokens() { - return Parser.getTokens(line); - } - - protected float parseFloat() { - return Parser.parseFloat(line, next); - } - - protected float parseFloat(String s) { - next[0] = 0; - return Parser.parseFloat(s, next); - } - - protected float parseFloatNext(String s) { - return Parser.parseFloat(s, next); - } - - protected int parseInt() { - return Parser.parseInt(line, next); - } - - protected int parseInt(String s) { - next[0] = 0; - return Parser.parseInt(s, next); - } - - protected int parseIntNext(String s) { - return Parser.parseInt(s, next); - } - - protected int parseInt(String s, int iStart) { - next[0] = iStart; - return Parser.parseInt(s, next); - } -} - - \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |