1 Clazz.declarePackage ("MCview");
\r
2 Clazz.load (["java.awt.Color"], "MCview.Bond", null, function () {
\r
3 c$ = Clazz.decorateAsClass (function () {
\r
6 this.startCol = null;
\r
10 Clazz.instantialize (this, arguments);
\r
12 Clazz.prepareFields (c$, function () {
\r
13 this.startCol = java.awt.Color.lightGray;
\r
14 this.endCol = java.awt.Color.lightGray;
\r
16 Clazz.makeConstructor (c$,
\r
17 function (at1, at2) {
\r
18 this.start = Clazz.newFloatArray (-1, [at1.x, at1.y, at1.z]);
\r
19 this.end = Clazz.newFloatArray (-1, [at2.x, at2.y, at2.z]);
\r
20 this.startCol = at1.color;
\r
21 this.endCol = at2.color;
\r
24 }, "MCview.Atom,MCview.Atom");
\r
25 Clazz.defineMethod (c$, "translate",
\r
26 function (x, y, z) {
\r
27 this.start[0] = this.start[0] + x;
\r
28 this.end[0] = this.end[0] + x;
\r
29 this.start[1] = this.start[1] + y;
\r
30 this.end[1] = this.end[1] + y;
\r
31 this.start[2] = this.start[2] + z;
\r
32 this.end[2] = this.end[2] + z;
\r