Revision: 5163
Author: hansonr
Date: 2006-05-23 18:01:59 -0700 (Tue, 23 May 2006)
ViewCVS: http://svn.sourceforge.net/jmol/?rev=5163&view=rev
Log Message:
-----------
bob200603 adding public methods in viewer: setAtomCoord() and
setAtomCoordRelative()
accessible via Jmol-new.js
jmolSetAtomCoord()
jmolSetAtomCoordRelative()
Modified Paths:
--------------
branches/bob200603/Jmol/src/org/jmol/viewer/Frame.java
branches/bob200603/Jmol/src/org/jmol/viewer/ModelManager.java
branches/bob200603/Jmol/src/org/jmol/viewer/Viewer.java
Modified: branches/bob200603/Jmol/src/org/jmol/viewer/Frame.java
===================================================================
--- branches/bob200603/Jmol/src/org/jmol/viewer/Frame.java 2006-05-23
14:12:16 UTC (rev 5162)
+++ branches/bob200603/Jmol/src/org/jmol/viewer/Frame.java 2006-05-24
01:01:59 UTC (rev 5163)
@@ -2706,4 +2706,19 @@
System.out.println(pt);
}
+ void setAtomCoord(int atomIndex, float x, float y, float z) {
+ if (atomIndex < 0 || atomIndex >= atomCount)
+ return;
+ atoms[atomIndex].point3f.x = x;
+ atoms[atomIndex].point3f.y = y;
+ atoms[atomIndex].point3f.z = z;
+ }
+
+ void setAtomCoordRelative(int atomIndex, float x, float y, float z) {
+ if (atomIndex < 0 || atomIndex >= atomCount)
+ return;
+ atoms[atomIndex].point3f.x += x;
+ atoms[atomIndex].point3f.y += y;
+ atoms[atomIndex].point3f.z += z;
+ }
}
Modified: branches/bob200603/Jmol/src/org/jmol/viewer/ModelManager.java
===================================================================
--- branches/bob200603/Jmol/src/org/jmol/viewer/ModelManager.java
2006-05-23 14:12:16 UTC (rev 5162)
+++ branches/bob200603/Jmol/src/org/jmol/viewer/ModelManager.java
2006-05-24 01:01:59 UTC (rev 5163)
@@ -1448,4 +1448,17 @@
return;
frame.setZeroBased();
}
+
+ public void setAtomCoord(int atomIndex, float x, float y, float z) {
+ if (frame == null)
+ return;
+ frame.setAtomCoord(atomIndex,x,y,z);
+ }
+
+ void setAtomCoordRelative(int atomIndex, float x, float y, float z) {
+ if (frame == null)
+ return;
+ frame.setAtomCoordRelative(atomIndex,x,y,z);
+ }
+
}
Modified: branches/bob200603/Jmol/src/org/jmol/viewer/Viewer.java
===================================================================
--- branches/bob200603/Jmol/src/org/jmol/viewer/Viewer.java 2006-05-23
14:12:16 UTC (rev 5162)
+++ branches/bob200603/Jmol/src/org/jmol/viewer/Viewer.java 2006-05-24
01:01:59 UTC (rev 5163)
@@ -1892,6 +1892,10 @@
repaintManager.popHoldRepaint();
}
+ public void refresh() {
+ repaintManager.refresh();
+ }
+
public void refresh(int isOrientationChange, String strWhy) {
repaintManager.refresh();
statusManager.setStatusViewerRefreshed(isOrientationChange, strWhy);
@@ -3163,11 +3167,19 @@
Point3f ptDefaultLattice = new Point3f();
void setDefaultLattice(Point3f ptLattice) {
- System.out.println("SETTINGDEAULTLATT"+ptLattice);
ptDefaultLattice.set(ptLattice);
}
Point3f getDefaultLattice() {
return ptDefaultLattice;
}
+
+ public void setAtomCoord(int atomIndex, float x, float y, float z) {
+ modelManager.setAtomCoord(atomIndex,x,y,z);
+ }
+
+ public void setAtomCoordRelative(int atomIndex, float x, float y, float z) {
+ modelManager.setAtomCoordRelative(atomIndex,x,y,z);
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Jmol-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-commits