diff options
author | Kris Kowal | 2012-07-06 11:52:06 -0700 |
---|---|---|
committer | Kris Kowal | 2012-07-06 15:01:48 -0700 |
commit | 648ee61ae84216d0236e0dbc211addc13b2cfa3a (patch) | |
tree | 8f0f55557bd0c47a84e49c1977c950645d284607 /js/helper-classes/RDGE/src/core/script/box.js | |
parent | aedd14b18695d031f695d27dfbd94df5614495bb (diff) | |
download | ninja-648ee61ae84216d0236e0dbc211addc13b2cfa3a.tar.gz |
Expand tabs
Diffstat (limited to 'js/helper-classes/RDGE/src/core/script/box.js')
-rwxr-xr-x | js/helper-classes/RDGE/src/core/script/box.js | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/js/helper-classes/RDGE/src/core/script/box.js b/js/helper-classes/RDGE/src/core/script/box.js index d33907a0..441ef6cf 100755 --- a/js/helper-classes/RDGE/src/core/script/box.js +++ b/js/helper-classes/RDGE/src/core/script/box.js | |||
@@ -115,48 +115,48 @@ RDGE.box.prototype.transform = function (mat) { | |||
115 | 115 | ||
116 | /* | 116 | /* |
117 | RDGE.box.prototype.transform = function(mat) { | 117 | RDGE.box.prototype.transform = function(mat) { |
118 | var newBox = new RDGE.box(); | 118 | var newBox = new RDGE.box(); |
119 | var e, f; | 119 | var e, f; |
120 | 120 | ||
121 | newBox.b[0] = mat[12]; newBox.b[1] = mat[13]; newBox.b[2] = mat[14]; | 121 | newBox.b[0] = mat[12]; newBox.b[1] = mat[13]; newBox.b[2] = mat[14]; |
122 | newBox.t[0] = mat[12]; newBox.t[1] = mat[13]; newBox.t[2] = mat[14]; | 122 | newBox.t[0] = mat[12]; newBox.t[1] = mat[13]; newBox.t[2] = mat[14]; |
123 | 123 | ||
124 | e = mat[0] * this.min[0]; f = mat[0] * this.max[0]; | 124 | e = mat[0] * this.min[0]; f = mat[0] * this.max[0]; |
125 | newBox.b[0] += (e < f) ? e : f; | 125 | newBox.b[0] += (e < f) ? e : f; |
126 | newBox.t[0] += (e < f) ? f : e; | 126 | newBox.t[0] += (e < f) ? f : e; |
127 | 127 | ||
128 | e = mat[4] * this.min[1]; f = mat[4] * this.max[1]; | 128 | e = mat[4] * this.min[1]; f = mat[4] * this.max[1]; |
129 | newBox.b[0] += (e < f) ? e : f; | 129 | newBox.b[0] += (e < f) ? e : f; |
130 | newBox.t[0] += (e < f) ? f : e; | 130 | newBox.t[0] += (e < f) ? f : e; |
131 | 131 | ||
132 | e = mat[8] * this.min[2]; f = mat[8] * this.max[2]; | 132 | e = mat[8] * this.min[2]; f = mat[8] * this.max[2]; |
133 | newBox.b[0] += (e < f) ? e : f; | 133 | newBox.b[0] += (e < f) ? e : f; |
134 | newBox.t[0] += (e < f) ? f : e; | 134 | newBox.t[0] += (e < f) ? f : e; |
135 | 135 | ||
136 | e = mat[1] * this.min[0]; f = mat[1] * this.max[0]; | 136 | e = mat[1] * this.min[0]; f = mat[1] * this.max[0]; |
137 | newBox.b[1] += (e < f) ? e : f; | 137 | newBox.b[1] += (e < f) ? e : f; |
138 | newBox.t[1] += (e < f) ? f : e; | 138 | newBox.t[1] += (e < f) ? f : e; |
139 | 139 | ||
140 | e = mat[5] * this.min[1]; f = mat[5] * this.max[1]; | 140 | e = mat[5] * this.min[1]; f = mat[5] * this.max[1]; |
141 | newBox.b[1] += (e < f) ? e : f; | 141 | newBox.b[1] += (e < f) ? e : f; |
142 | newBox.t[1] += (e < f) ? f : e; | 142 | newBox.t[1] += (e < f) ? f : e; |
143 | 143 | ||
144 | e = mat[9] * this.min[2]; f = mat[9] * this.max[2]; | 144 | e = mat[9] * this.min[2]; f = mat[9] * this.max[2]; |
145 | newBox.b[1] += (e < f) ? e : f; | 145 | newBox.b[1] += (e < f) ? e : f; |
146 | newBox.t[1] += (e < f) ? f : e; | 146 | newBox.t[1] += (e < f) ? f : e; |
147 | 147 | ||
148 | e = mat[2] * this.min[0]; f = mat[2] * this.max[0]; | 148 | e = mat[2] * this.min[0]; f = mat[2] * this.max[0]; |
149 | newBox.b[2] += (e < f) ? e : f; | 149 | newBox.b[2] += (e < f) ? e : f; |
150 | newBox.t[2] += (e < f) ? f : e; | 150 | newBox.t[2] += (e < f) ? f : e; |
151 | 151 | ||
152 | e = mat[6] * this.min[1]; f = mat[6] * this.max[1]; | 152 | e = mat[6] * this.min[1]; f = mat[6] * this.max[1]; |
153 | newBox.b[2] += (e < f) ? e : f; | 153 | newBox.b[2] += (e < f) ? e : f; |
154 | newBox.t[2] += (e < f) ? f : e; | 154 | newBox.t[2] += (e < f) ? f : e; |
155 | 155 | ||
156 | e = mat[10] * this.min[2]; f = mat[10] * this.max[2]; | 156 | e = mat[10] * this.min[2]; f = mat[10] * this.max[2]; |
157 | newBox.b[2] += (e < f) ? e : f; | 157 | newBox.b[2] += (e < f) ? e : f; |
158 | newBox.t[2] += (e < f) ? f : e; | 158 | newBox.t[2] += (e < f) ? f : e; |
159 | 159 | ||
160 | return newBox; | 160 | return newBox; |
161 | }; | 161 | }; |
162 | */ | 162 | */ |