1 Clazz.declarePackage ("JU");
\r
2 Clazz.load (null, "JU.T3d", ["java.lang.Double"], function () {
\r
3 c$ = Clazz.decorateAsClass (function () {
\r
7 Clazz.instantialize (this, arguments);
\r
8 }, JU, "T3d", null, java.io.Serializable);
\r
9 Clazz.makeConstructor (c$,
\r
12 Clazz.defineMethod (c$, "set",
\r
13 function (x, y, z) {
\r
18 Clazz.defineMethod (c$, "setA",
\r
24 Clazz.defineMethod (c$, "setT",
\r
30 Clazz.defineMethod (c$, "add2",
\r
32 this.x = t1.x + t2.x;
\r
33 this.y = t1.y + t2.y;
\r
34 this.z = t1.z + t2.z;
\r
35 }, "JU.T3d,JU.T3d");
\r
36 Clazz.defineMethod (c$, "add",
\r
42 Clazz.defineMethod (c$, "sub2",
\r
44 this.x = t1.x - t2.x;
\r
45 this.y = t1.y - t2.y;
\r
46 this.z = t1.z - t2.z;
\r
47 }, "JU.T3d,JU.T3d");
\r
48 Clazz.defineMethod (c$, "sub",
\r
54 Clazz.defineMethod (c$, "scale",
\r
60 Clazz.defineMethod (c$, "scaleAdd",
\r
61 function (s, t1, t2) {
\r
62 this.x = s * t1.x + t2.x;
\r
63 this.y = s * t1.y + t2.y;
\r
64 this.z = s * t1.z + t2.z;
\r
65 }, "~N,JU.T3d,JU.T3d");
\r
66 Clazz.overrideMethod (c$, "hashCode",
\r
68 var xbits = JU.T3d.doubleToLongBits0 (this.x);
\r
69 var ybits = JU.T3d.doubleToLongBits0 (this.y);
\r
70 var zbits = JU.T3d.doubleToLongBits0 (this.z);
\r
71 return (xbits ^ (xbits >> 32) ^ ybits ^ (ybits >> 32) ^ zbits ^ (zbits >> 32));
\r
73 c$.doubleToLongBits0 = Clazz.defineMethod (c$, "doubleToLongBits0",
\r
75 return (d == 0 ? 0 : Double.doubleToLongBits (d));
\r
77 Clazz.overrideMethod (c$, "equals",
\r
79 if (!(Clazz.instanceOf (t1, JU.T3d))) return false;
\r
81 return (this.x == t2.x && this.y == t2.y && this.z == t2.z);
\r
83 Clazz.overrideMethod (c$, "toString",
\r
85 return "{" + this.x + ", " + this.y + ", " + this.z + "}";
\r