aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/3D/view-utils.js
diff options
context:
space:
mode:
authorhwc4872012-05-22 16:40:42 -0700
committerhwc4872012-05-22 16:40:42 -0700
commit08851078e89e9d4cb8fa341fa697a91be8de8ab9 (patch)
treefee8c0d38c1c540ef00c33e728346d765a4e699c /js/helper-classes/3D/view-utils.js
parent50ede4afa801f53caff7939dad0408f9a0a8b744 (diff)
parent862ee363584dfba4bdd9abacbc3a3244c7ec66b5 (diff)
downloadninja-08851078e89e9d4cb8fa341fa697a91be8de8ab9.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Textures
Conflicts: js/lib/geom/shape-primitive.js js/lib/rdge/materials/linear-gradient-material.js
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 919f7c50..00124900 100755
--- a/js/helper-classes/3D/view-utils.js
+++ b/js/helper-classes/3D/view-utils.js
@@ -156,14 +156,6 @@ exports.ViewUtils = Montage.create(Component, {
156 viewDir = MathUtils.transformVector( [0,0,1], stageInv ); 156 viewDir = MathUtils.transformVector( [0,0,1], stageInv );
157 } 157 }
158 158
159 /*
160 if (elt === stage)
161 {
162 xVec = [1,0,0];
163 yVec = [0,1,0];
164 }
165 */
166
167 var plane; 159 var plane;
168 var xDot, yDot, zDot; 160 var xDot, yDot, zDot;
169 switch (axis) 161 switch (axis)
@@ -288,6 +280,11 @@ exports.ViewUtils = Montage.create(Component, {
288 value: function( localPt, elt ) { 280 value: function( localPt, elt ) {
289 this.pushViewportObj( elt ); 281 this.pushViewportObj( elt );
290 var viewPt = this.screenToView( localPt[0], localPt[1], localPt[2] ); 282 var viewPt = this.screenToView( localPt[0], localPt[1], localPt[2] );
283 if ((elt == null) || (elt === this._stageElement))
284 {
285 this.popViewportObj();
286 return viewPt;
287 }
291 var mat = this.getMatrixFromElement( elt ); 288 var mat = this.getMatrixFromElement( elt );
292 var worldPt = MathUtils.transformPoint( viewPt, mat ); 289 var worldPt = MathUtils.transformPoint( viewPt, mat );
293 var stageWorldPt = this.postViewToStageWorld( worldPt, elt ); 290 var stageWorldPt = this.postViewToStageWorld( worldPt, elt );