aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/3D/view-utils.js
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-05-22 18:02:36 -0700
committerJose Antonio Marquez2012-05-22 18:02:36 -0700
commit27e6e1238ec1adb34aa396074e2559801c7e4314 (patch)
treed27f27fd071d9df575c6014eed0efee252ff0390 /js/helper-classes/3D/view-utils.js
parent75fe4f36a6768d688792bc1925cfa4bfa508ac3e (diff)
parenta341522e3603c18ab3b93defa894e3be702dd0f4 (diff)
downloadninja-27e6e1238ec1adb34aa396074e2559801c7e4314.tar.gz
Merge branch 'refs/heads/Ninja-DOM-Architecture' into Document
Diffstat (limited to 'js/helper-classes/3D/view-utils.js')
-rwxr-xr-xjs/helper-classes/3D/view-utils.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/js/helper-classes/3D/view-utils.js b/js/helper-classes/3D/view-utils.js
index 75530af3..0080bf90 100755
--- a/js/helper-classes/3D/view-utils.js
+++ b/js/helper-classes/3D/view-utils.js
@@ -143,14 +143,6 @@ exports.ViewUtils = Montage.create(Component, {
143 viewDir = MathUtils.transformVector( [0,0,1], stageInv ); 143 viewDir = MathUtils.transformVector( [0,0,1], stageInv );
144 } 144 }
145 145
146 /*
147 if (elt === stage)
148 {
149 xVec = [1,0,0];
150 yVec = [0,1,0];
151 }
152 */
153
154 var plane; 146 var plane;
155 var xDot, yDot, zDot; 147 var xDot, yDot, zDot;
156 switch (axis) 148 switch (axis)
@@ -275,6 +267,11 @@ exports.ViewUtils = Montage.create(Component, {
275 value: function( localPt, elt ) { 267 value: function( localPt, elt ) {
276 this.pushViewportObj( elt ); 268 this.pushViewportObj( elt );
277 var viewPt = this.screenToView( localPt[0], localPt[1], localPt[2] ); 269 var viewPt = this.screenToView( localPt[0], localPt[1], localPt[2] );
270 if ((elt == null) || (elt === this._stageElement))
271 {
272 this.popViewportObj();
273 return viewPt;
274 }
278 var mat = this.getMatrixFromElement( elt ); 275 var mat = this.getMatrixFromElement( elt );
279 var worldPt = MathUtils.transformPoint( viewPt, mat ); 276 var worldPt = MathUtils.transformPoint( viewPt, mat );
280 var stageWorldPt = this.postViewToStageWorld( worldPt, elt ); 277 var stageWorldPt = this.postViewToStageWorld( worldPt, elt );