diff options
Diffstat (limited to 'js/helper-classes/3D/snap-2d-record.js')
-rwxr-xr-x | js/helper-classes/3D/snap-2d-record.js | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/js/helper-classes/3D/snap-2d-record.js b/js/helper-classes/3D/snap-2d-record.js index 26afaed2..59fa4b77 100755 --- a/js/helper-classes/3D/snap-2d-record.js +++ b/js/helper-classes/3D/snap-2d-record.js | |||
@@ -36,45 +36,45 @@ var viewUtils = require("js/helper-classes/3D/view-utils").ViewUtils; | |||
36 | var snapManager = require("js/helper-classes/3D/snap-manager"); | 36 | var snapManager = require("js/helper-classes/3D/snap-manager"); |
37 | var Snap2DRecord = exports.Snap2DRecord = Object.create(Object.prototype, | 37 | var Snap2DRecord = exports.Snap2DRecord = Object.create(Object.prototype, |
38 | { | 38 | { |
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 | ||
53 | // indices to the extremal align points | 53 | // indices to the extremal align points |
54 | _xMinArray : { value: [], writable: true }, | 54 | _xMinArray : { value: [], writable: true }, |
55 | _xMaxArray : { value: [] , writable: true}, | 55 | _xMaxArray : { value: [] , writable: true}, |
56 | _yMinArray : { value: [] , writable: true}, | 56 | _yMinArray : { value: [] , writable: true}, |
57 | _yMaxArray : { value: [] , writable: true}, | 57 | _yMaxArray : { value: [] , writable: true}, |
58 | 58 | ||
59 | /////////////////////////////////////////////////////////////////////// | 59 | /////////////////////////////////////////////////////////////////////// |
60 | // Property accessors | 60 | // Property accessors |
61 | /////////////////////////////////////////////////////////////////////// | 61 | /////////////////////////////////////////////////////////////////////// |
62 | getElement: { value: function() { return this._elt; }}, | 62 | getElement: { value: function() { return this._elt; }}, |
63 | setElement: { value: function() { this._elt = e; }}, | 63 | setElement: { value: function() { this._elt = e; }}, |
64 | 64 | ||
65 | getScreenPointArray: { value: function() { return this._screenPtArray; }}, | 65 | getScreenPointArray: { value: function() { return this._screenPtArray; }}, |
66 | getAlignPointArray: { value: function() { return this._alignPtArray; }}, | 66 | getAlignPointArray: { value: function() { return this._alignPtArray; }}, |
67 | 67 | ||
68 | getLocalToGlobalMatrix: { value: function() { return this._localToGlobalMat; }}, | 68 | getLocalToGlobalMatrix: { value: function() { return this._localToGlobalMat; }}, |
69 | setLocalToGlobalMatrix: { value: function() { this._localToGlobalMat = l2g.slice(0); }}, | 69 | setLocalToGlobalMatrix: { value: function() { this._localToGlobalMat = l2g.slice(0); }}, |
70 | 70 | ||
71 | getGlobalToLocalMatrix: { value: function() { return this._globalToLocalMat; }}, | 71 | getGlobalToLocalMatrix: { value: function() { return this._globalToLocalMat; }}, |
72 | setGlobalToLocalMatrix: { value: function() { this._globalToLocalMat = g2l.slice(0); }}, | 72 | setGlobalToLocalMatrix: { value: function() { this._globalToLocalMat = g2l.slice(0); }}, |
73 | 73 | ||
74 | /////////////////////////////////////////////////////////////////////// | 74 | /////////////////////////////////////////////////////////////////////// |
75 | // Methods | 75 | // Methods |
76 | /////////////////////////////////////////////////////////////////////// | 76 | /////////////////////////////////////////////////////////////////////// |
77 | init: { | 77 | init: { |
78 | value: function( elt ) { | 78 | value: function( elt ) { |
79 | this._elt = elt; | 79 | this._elt = elt; |
80 | var bounds = viewUtils.getElementViewBounds3D( elt ); | 80 | var bounds = viewUtils.getElementViewBounds3D( elt ); |
@@ -112,7 +112,7 @@ var Snap2DRecord = exports.Snap2DRecord = Object.create(Object.prototype, | |||
112 | } | 112 | } |
113 | }, | 113 | }, |
114 | 114 | ||
115 | initAlignExtremalPoints: { | 115 | initAlignExtremalPoints: { |
116 | value: function() { | 116 | value: function() { |
117 | var xMinArray = [0], xMaxArray = [0], | 117 | var xMinArray = [0], xMaxArray = [0], |
118 | yMinArray = [0], yMaxArray = [0]; | 118 | yMinArray = [0], yMaxArray = [0]; |
@@ -135,7 +135,7 @@ var Snap2DRecord = exports.Snap2DRecord = Object.create(Object.prototype, | |||
135 | } | 135 | } |
136 | }, | 136 | }, |
137 | 137 | ||
138 | getScreenPoint: { | 138 | getScreenPoint: { |
139 | value: function( index ) { | 139 | value: function( index ) { |
140 | var rtnPt; | 140 | var rtnPt; |
141 | if ((index >= 0) && (index < 4) && (this._screenPtArray != null)) | 141 | if ((index >= 0) && (index < 4) && (this._screenPtArray != null)) |
@@ -145,7 +145,7 @@ var Snap2DRecord = exports.Snap2DRecord = Object.create(Object.prototype, | |||
145 | } | 145 | } |
146 | }, | 146 | }, |
147 | 147 | ||
148 | addAlignPoint: { | 148 | addAlignPoint: { |
149 | value: function( pt ) { | 149 | value: function( pt ) { |
150 | this._alignPtArray.push( pt ); | 150 | this._alignPtArray.push( pt ); |
151 | } | 151 | } |