From: Michael T H. <mic...@us...> - 2002-12-12 18:05:57
|
Update of /cvsroot/jmol/Jmol/src/org/openscience/jmol In directory sc8-pr-cvs1:/tmp/cvs-serv2782/src/org/openscience/jmol Modified Files: Atom.java ChemFrame.java Removed Files: Transformable.java Log Message: integrated Transformable into Shape Index: Atom.java =================================================================== RCS file: /cvsroot/jmol/Jmol/src/org/openscience/jmol/Atom.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -r1.32 -r1.33 *** Atom.java 11 Dec 2002 22:48:47 -0000 1.32 --- Atom.java 12 Dec 2002 18:05:52 -0000 1.33 *************** *** 174,177 **** --- 174,181 ---- public Point3d getScaledVector() { + if (vector == null) { + System.out.println("(vector == null) in getScaledVector"); + return null; + } Point3d vectorScaled = new Point3d(); vectorScaled.scaleAdd(2.0, vector, getPosition()); *************** *** 198,212 **** * first be transformed. Otherwise, a point at the origin is returned. */ public Point3d getScreenVector() { return atomShape.screenVector; } ! ! /** ! * Sets the atom's screen position by transforming the atom's position by ! * the given matrix. ! */ ! public void transform(DisplayControl control) { ! atomShape.transform(control); ! } /** --- 202,210 ---- * first be transformed. Otherwise, a point at the origin is returned. */ + /* public Point3d getScreenVector() { return atomShape.screenVector; } ! */ /** Index: ChemFrame.java =================================================================== RCS file: /cvsroot/jmol/Jmol/src/org/openscience/jmol/ChemFrame.java,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -r1.70 -r1.71 *** ChemFrame.java 11 Dec 2002 22:48:48 -0000 1.70 --- ChemFrame.java 12 Dec 2002 18:05:53 -0000 1.71 *************** *** 33,37 **** * @author J. Daniel Gezelter */ ! public class ChemFrame implements Transformable { // This stuff can vary for each frame in the dynamics: --- 33,37 ---- * @author J. Daniel Gezelter */ ! public class ChemFrame { // This stuff can vary for each frame in the dynamics: *************** *** 352,368 **** /** - * Transform all the points in this model - */ - public void transform(DisplayControl control) { - - if (numberAtoms <= 0) { - return; - } - for (int i = 0; i < numberAtoms; ++i) { - atoms[i].transform(control); - } - } - - /** * Find all atoms within designated region. * --- 352,355 ---- *************** *** 462,472 **** void calculateAtomVectorMagnitudeRange() { ! minAtomVectorMagnitude = maxAtomVectorMagnitude = 0; for (int i = 0; i < numberAtoms; ++i) { double magnitude=atoms[i].getVectorMagnitude(); if (magnitude > maxAtomVectorMagnitude) { maxAtomVectorMagnitude = magnitude; ! } else if ((magnitude < minAtomVectorMagnitude) || ! (minAtomVectorMagnitude == 0f)) { minAtomVectorMagnitude = magnitude; } --- 449,462 ---- void calculateAtomVectorMagnitudeRange() { ! minAtomVectorMagnitude = maxAtomVectorMagnitude = -1; for (int i = 0; i < numberAtoms; ++i) { + if (!atoms[i].hasVector()) + continue; double magnitude=atoms[i].getVectorMagnitude(); if (magnitude > maxAtomVectorMagnitude) { maxAtomVectorMagnitude = magnitude; ! } ! if ((magnitude < minAtomVectorMagnitude) || ! (minAtomVectorMagnitude == -1)) { minAtomVectorMagnitude = magnitude; } --- Transformable.java DELETED --- |