aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/3D
diff options
context:
space:
mode:
authorKris Kowal2012-07-06 11:53:10 -0700
committerKris Kowal2012-07-06 15:01:48 -0700
commit04343eda8c2f870b0da55cfdc8003c99fe1cc4de (patch)
tree0a6048889b65bb16ff58822e55bc1346e9eb07bd /js/helper-classes/3D
parent648ee61ae84216d0236e0dbc211addc13b2cfa3a (diff)
downloadninja-04343eda8c2f870b0da55cfdc8003c99fe1cc4de.tar.gz
Remove trailing spaces
Diffstat (limited to 'js/helper-classes/3D')
-rwxr-xr-xjs/helper-classes/3D/Rectangle.js2
-rwxr-xr-xjs/helper-classes/3D/draw-utils.js6
-rwxr-xr-xjs/helper-classes/3D/hit-record.js2
-rwxr-xr-xjs/helper-classes/3D/math-utils.js6
-rwxr-xr-xjs/helper-classes/3D/snap-2d-record.js4
-rwxr-xr-xjs/helper-classes/3D/snap-manager.js40
-rwxr-xr-xjs/helper-classes/3D/vec-utils.js4
-rwxr-xr-xjs/helper-classes/3D/view-utils.js18
8 files changed, 41 insertions, 41 deletions
diff --git a/js/helper-classes/3D/Rectangle.js b/js/helper-classes/3D/Rectangle.js
index fb6127ed..15f812ab 100755
--- a/js/helper-classes/3D/Rectangle.js
+++ b/js/helper-classes/3D/Rectangle.js
@@ -220,7 +220,7 @@ var Rectangle = exports.Rectangle = Object.create(Object.prototype, {
220 this.setTop( yMin ); this.setHeight( yMax - yMin ); 220 this.setTop( yMin ); this.setHeight( yMax - yMin );
221 } 221 }
222 }, 222 },
223 223
224 224
225 translate: { 225 translate: {
226 value: function( dx, dy ) 226 value: function( dx, dy )
diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js
index 6f4c287d..65a2647e 100755
--- a/js/helper-classes/3D/draw-utils.js
+++ b/js/helper-classes/3D/draw-utils.js
@@ -869,7 +869,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
869 tmpPt, 869 tmpPt,
870 ssMat, 870 ssMat,
871 elt; 871 elt;
872 872
873 if (len === 0) return; 873 if (len === 0) return;
874 var context = this._drawingContext; 874 var context = this._drawingContext;
875 if (!context) return; 875 if (!context) return;
@@ -910,7 +910,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
910 910
911 this._selectionCtr = MathUtils.getCenterFromBounds(3, bounds3D); 911 this._selectionCtr = MathUtils.getCenterFromBounds(3, bounds3D);
912// console.log("selection center, single elt case - ", this._selectionCtr); 912// console.log("selection center, single elt case - ", this._selectionCtr);
913 913
914 this.viewUtils.popViewportObj(); 914 this.viewUtils.popViewportObj();
915 } 915 }
916 else 916 else
@@ -1328,7 +1328,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
1328 var arrowSize = 50 / zoomFactor; 1328 var arrowSize = 50 / zoomFactor;
1329 var xAxis = [arrowSize,0,0,1]; 1329 var xAxis = [arrowSize,0,0,1];
1330 //var rO = resMat.multiply(origin); 1330 //var rO = resMat.multiply(origin);
1331 var rO = glmat4.multiplyVec3( resMat, origin, []); 1331 var rO = glmat4.multiplyVec3( resMat, origin, []);
1332 //var xO = resMat.multiply(xAxis); 1332 //var xO = resMat.multiply(xAxis);
1333 var xO = glmat4.multiplyVec3( resMat, xAxis, []); 1333 var xO = glmat4.multiplyVec3( resMat, xAxis, []);
1334 1334
diff --git a/js/helper-classes/3D/hit-record.js b/js/helper-classes/3D/hit-record.js
index 4c1a71b0..7e39bb50 100755
--- a/js/helper-classes/3D/hit-record.js
+++ b/js/helper-classes/3D/hit-record.js
@@ -60,7 +60,7 @@ var HitRecord = exports.HitRecord = Object.create(Object.prototype,
60 SNAP_TYPE_ELEMENT_CENTER: { value: 11, writable: true }, 60 SNAP_TYPE_ELEMENT_CENTER: { value: 11, writable: true },
61 SNAP_TYPE_CONTAINED_ELEMENT: { value: 12, writable: true }, 61 SNAP_TYPE_CONTAINED_ELEMENT: { value: 12, writable: true },
62 SNAP_TYPE_UNDEFINED: { value: null, writable: -1 }, 62 SNAP_TYPE_UNDEFINED: { value: null, writable: -1 },
63 63
64 /////////////////////////////////////////////////////////////////////// 64 ///////////////////////////////////////////////////////////////////////
65 // Instance variables 65 // Instance variables
66 /////////////////////////////////////////////////////////////////////// 66 ///////////////////////////////////////////////////////////////////////
diff --git a/js/helper-classes/3D/math-utils.js b/js/helper-classes/3D/math-utils.js
index 3c981d0d..191b02bd 100755
--- a/js/helper-classes/3D/math-utils.js
+++ b/js/helper-classes/3D/math-utils.js
@@ -41,7 +41,7 @@ var MathUtilsClass = exports.MathUtilsClass = Object.create(Object.prototype, {
41 // Instance variables 41 // Instance variables
42 /////////////////////////////////////////////////////////////////////// 42 ///////////////////////////////////////////////////////////////////////
43// VecUtils: { value: null, writable: true }, 43// VecUtils: { value: null, writable: true },
44 44
45 EPSILON: { value: 1.e-5, writable: true }, 45 EPSILON: { value: 1.e-5, writable: true },
46 46
47 // these are used in containment tests 47 // these are used in containment tests
@@ -616,7 +616,7 @@ var MathUtilsClass = exports.MathUtilsClass = Object.create(Object.prototype, {
616 // test 1. Overall bounding box test 616 // test 1. Overall bounding box test
617 if ((xMaxElt < xMin) || (xMinElt > xMax) || (yMaxElt < yMin) || (yMinElt > yMax)) 617 if ((xMaxElt < xMin) || (xMinElt > xMax) || (yMaxElt < yMin) || (yMinElt > yMax))
618 return false; 618 return false;
619 619
620 // test 2. See if any of the corners of the element are contained in the rectangle 620 // test 2. See if any of the corners of the element are contained in the rectangle
621 var rect = Object.create(Rectangle, {}); 621 var rect = Object.create(Rectangle, {});
622 rect.set( pt[0], pt[1], width, height ); 622 rect.set( pt[0], pt[1], width, height );
@@ -939,7 +939,7 @@ var MathUtilsClass = exports.MathUtilsClass = Object.create(Object.prototype, {
939 }, 939 },
940 940
941 /////////////////////////////////////////////////////////////////////// 941 ///////////////////////////////////////////////////////////////////////
942 // Utility method to calculate angle between two 3D vectors 942 // Utility method to calculate angle between two 3D vectors
943 /////////////////////////////////////////////////////////////////////// 943 ///////////////////////////////////////////////////////////////////////
944 getAxisAngleBetween3DVectors: { 944 getAxisAngleBetween3DVectors: {
945 value: function (vec1, vec2, axis) { 945 value: function (vec1, vec2, axis) {
diff --git a/js/helper-classes/3D/snap-2d-record.js b/js/helper-classes/3D/snap-2d-record.js
index 59fa4b77..5119ae6f 100755
--- a/js/helper-classes/3D/snap-2d-record.js
+++ b/js/helper-classes/3D/snap-2d-record.js
@@ -39,14 +39,14 @@ var Snap2DRecord = exports.Snap2DRecord = Object.create(Object.prototype,
39 /////////////////////////////////////////////////////////////////////// 39 ///////////////////////////////////////////////////////////////////////
40 // Constant definitions 40 // Constant definitions
41 /////////////////////////////////////////////////////////////////////// 41 ///////////////////////////////////////////////////////////////////////
42 42
43 /////////////////////////////////////////////////////////////////////// 43 ///////////////////////////////////////////////////////////////////////
44 // Instance variables 44 // Instance variables
45 /////////////////////////////////////////////////////////////////////// 45 ///////////////////////////////////////////////////////////////////////
46 _elt : { value: null , writable: true}, // the four boundary points for the element in global screen space 46 _elt : { value: null , writable: true}, // the four boundary points for the element in global screen space
47 _screenPtArray : { value: null , writable: true}, // snap point in global screen space 47 _screenPtArray : { value: null , writable: true}, // snap point in global screen space
48 _alignPtArray : { value: null , writable: true}, // points for snap-align. Kept in working plane space 48 _alignPtArray : { value: null , writable: true}, // points for snap-align. Kept in working plane space
49 49
50 _localToGlobalMat : { value: null, writable: true }, 50 _localToGlobalMat : { value: null, writable: true },
51 _globalToLocalMat : { value: null, writable: true }, 51 _globalToLocalMat : { value: null, writable: true },
52 52
diff --git a/js/helper-classes/3D/snap-manager.js b/js/helper-classes/3D/snap-manager.js
index 2289f963..e5044e09 100755
--- a/js/helper-classes/3D/snap-manager.js
+++ b/js/helper-classes/3D/snap-manager.js
@@ -210,7 +210,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
210 }, 210 },
211 211
212 snap : { 212 snap : {
213 value: function (xScreen, yScreen, snap3D, quadPt) 213 value: function (xScreen, yScreen, snap3D, quadPt)
214 { 214 {
215 // force a 3D snap if a 2D snap is requested but the 2D cache has not been initialized 215 // force a 3D snap if a 2D snap is requested but the 2D cache has not been initialized
216 if (!snap3D && !this._elementCache) snap3D = true; 216 if (!snap3D && !this._elementCache) snap3D = true;
@@ -282,7 +282,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
282 this.deactivateDragPlane(); 282 this.deactivateDragPlane();
283 283
284 this.setLastHit( rtnHit ); 284 this.setLastHit( rtnHit );
285 285
286 //rtnHit.test(); // DEBUG CODE. REMOVE THIS 286 //rtnHit.test(); // DEBUG CODE. REMOVE THIS
287 return rtnHit; 287 return rtnHit;
288 } 288 }
@@ -305,7 +305,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
305 var stageWorldPt0 = viewUtils.localToStageWorld( localPt0, stage ), 305 var stageWorldPt0 = viewUtils.localToStageWorld( localPt0, stage ),
306 stageWorldPt1 = viewUtils.localToStageWorld( localPt1, stage ); 306 stageWorldPt1 = viewUtils.localToStageWorld( localPt1, stage );
307 var vec = vecUtils.vecSubtract( 3, stageWorldPt1, stageWorldPt0 ); 307 var vec = vecUtils.vecSubtract( 3, stageWorldPt1, stageWorldPt0 );
308 308
309 var ptOnWorkingPlane = MathUtils.vecIntersectPlane(stageWorldPt0, vec, workingPlane); 309 var ptOnWorkingPlane = MathUtils.vecIntersectPlane(stageWorldPt0, vec, workingPlane);
310 310
311 var wpMat = drawUtils.getPlaneToWorldMatrix(workingPlane, MathUtils.getPointOnPlane(workingPlane)), 311 var wpMat = drawUtils.getPlaneToWorldMatrix(workingPlane, MathUtils.getPointOnPlane(workingPlane)),
@@ -1023,7 +1023,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
1023 } 1023 }
1024 }, 1024 },
1025 1025
1026 hSnapToElements : 1026 hSnapToElements :
1027 { 1027 {
1028 value: function( elt, hitRecs, depth, globalScrPt ) 1028 value: function( elt, hitRecs, depth, globalScrPt )
1029 { 1029 {
@@ -1081,9 +1081,9 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
1081 } 1081 }
1082 }, 1082 },
1083 1083
1084 snapToElement : 1084 snapToElement :
1085 { 1085 {
1086 value: function( elt, globalScrPt ) 1086 value: function( elt, globalScrPt )
1087 { 1087 {
1088 if (this.isAvoidedElement(elt) ) return null; 1088 if (this.isAvoidedElement(elt) ) return null;
1089 1089
@@ -1096,7 +1096,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
1096 var eltMat = viewUtils.getLocalToGlobalMatrix( elt ); 1096 var eltMat = viewUtils.getLocalToGlobalMatrix( elt );
1097 for (var i=0; i<4; i++) 1097 for (var i=0; i<4; i++)
1098 bounds3D[i] = viewUtils.localToGlobal2(bounds[i], eltMat); 1098 bounds3D[i] = viewUtils.localToGlobal2(bounds[i], eltMat);
1099 1099
1100 var hitRec = this.snapToScreenBounds( elt, globalScrPt, bounds, bounds3D ); 1100 var hitRec = this.snapToScreenBounds( elt, globalScrPt, bounds, bounds3D );
1101 1101
1102 // see if we can snap to a contained geometry object 1102 // see if we can snap to a contained geometry object
@@ -1117,9 +1117,9 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
1117 } 1117 }
1118 }, 1118 },
1119 1119
1120 snapToScreenBounds : 1120 snapToScreenBounds :
1121 { 1121 {
1122 value: function( elt, scrPt, bounds, bounds3D ) 1122 value: function( elt, scrPt, bounds, bounds3D )
1123 { 1123 {
1124 // push the element as the current viewport element 1124 // push the element as the current viewport element
1125 viewUtils.pushViewportObj( elt ); 1125 viewUtils.pushViewportObj( elt );