-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathliang-barsky.min.js
173 lines (144 loc) · 17.1 KB
/
liang-barsky.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
(function (exports) {
'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
/*
* @CreateTime: Mar 5, 2017 8:03 PM
* @Author: Emidio Bianco
* @Contact: [email protected]
* @Last Modified By: undefined
* @Last Modified Time: Mar 6, 2017 12:00 AM
* @Description: Class representing the point in a 2D plane
*/
function Point() {
this.x = this.y = 0;
switch (arguments.length) {
case 0:
break;
case 1:
if (_typeof(arguments[0]) == 'object') {
if (Array.isArray(arguments[0])) {
this.x = arguments[0][0];
this.y = arguments[0][1];
}
// TODO: should it clone the Point or use the instance ????
else if (arguments[0] instanceof Point) {
this.x = arguments[0].x;
this.y = arguments[0].y;
}
} else {
this.x = this.y = arguments[0];
}
break;
case 2:
this.x = arguments[0];
this.y = arguments[1];
}
}
Point.prototype = {
setX: function setX(x) {
this.x = x;
},
setY: function setY(y) {
this.y = y;
},
set: function set$$1(x, y) {
this.setX(x);
this.setY(y);
},
clone: function clone() {
return new Point(this.x, this.y);
}
};
// import * as glpk from './glpk.min.js';
// import * as jszip from 'jszip';
// import * as lalolib from './lalolib';
function LiangBarsky(startX, startY, endX, endY, width, height, rectX, rectY) {
this.pStart = new Point(startX, startY), this.pEnd = new Point(endX, endY);
this.xMin = rectX, this.yMin = rectY;
this.xMax = width, this.yMax = height;
}
LiangBarsky.prototype = {
compute: function compute() {
var deltaX = this.pEnd.x - this.pStart.x,
deltaY = this.pEnd.y - this.pStart.y;
var pLeft = -deltaX,
qLeft = this.pStart.x - this.xMin,
pRight = deltaX,
qRight = this.xMax - this.pStart.x,
pBottom = -deltaY,
qBottom = this.pStart.y - this.yMin,
pTop = deltaY,
qTop = this.yMax - this.pStart.y;
// pTop = -deltaY, qTop = this.pStart.y - this.yMin,
// pBottom = deltaY, qBottom = this.yMax - this.pStart.y;
var uLeft = qLeft / pLeft,
uRight = qRight / pRight,
uBottom = qBottom / pBottom,
uTop = qTop / pTop;
var p = new Array(),
q = new Array();
p.push(pLeft);p.push(pRight);p.push(pBottom);p.push(pTop);
q.push(qLeft);q.push(qRight);q.push(qBottom);q.push(qTop);
var x1 = this.pStart.x,
y1 = this.pStart.y,
x2 = this.pEnd.x,
y2 = this.pEnd.y;
for (var i = 0; i < 4; i++) {
if (p[i] == 0) {
console.debug("line is parallel to one of the clipping boundary");
// if q[i] >= 0 the line is inside the clipping boundary
if (q[i] >= 0) {
// vertical
if (i < 2) {
if (y1 < this.yMin) {
y1 = this.yMin;
}
if (y2 > this.yMax) {
y2 = this.yMax;
}
console.log('line( ' + this.pStart.x + ',' + y1 + ',' + this.pEnd.x + ',' + y2 + ')');
if (this.pStart.x < this.xMin || this.xMax < this.pEnd.x) return -1;else return [this.pStart.x, y1, this.pEnd.x, y2];
}
//horizontal
if (i > 1) {
if (x1 < this.xMin) {
x1 = this.xMin;
}
if (x2 > this.xMax) {
x2 = this.xMax;
}
console.log('line( ' + x1 + ',' + this.pStart.y + ',' + x2 + ',' + this.pEnd.y + ')');
if (this.pStart.y < this.yMin || this.yMax < this.pEnd.y) return -1;else return [x1, this.pStart.y, x2, this.pEnd.y];
}
}
}
}
var t1 = 0;
var t2 = 1;
for (var i = 0; i < 4; i++) {
var temp = q[i] / p[i];
console.log(temp);
if (p[i] < 0) {
if (t1 <= temp) t1 = temp;
} else {
if (t2 > temp) t2 = temp;
}
}
//TODO: review
if (t1 < t2) {
var xx1 = x1 + t1 * p[1];
var xx2 = x1 + t2 * p[1];
var yy1 = y1 + t1 * p[3];
var yy2 = y1 + t2 * p[3];
console.log('line( ' + xx1 + ',' + yy1 + ',' + xx2 + ',' + yy2 + ')');
return [xx1, yy1, xx2, yy2];
}
}
};
exports.LiangBarsky = LiangBarsky;
}((this.window = this.window || {})));
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlhbmctYmFyc2t5Lm1pbi5qcyIsInNvdXJjZXMiOlsiZ2VvbS5qcyIsImxpYW5nLWJhcnNreS5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogQENyZWF0ZVRpbWU6IE1hciA1LCAyMDE3IDg6MDMgUE0gXG4gKiBAQXV0aG9yOiBFbWlkaW8gQmlhbmNvIFxuICogQENvbnRhY3Q6IGVtaWRpb2JpYUBnbWFpbC5jb20gXG4gKiBATGFzdCBNb2RpZmllZCBCeTogdW5kZWZpbmVkXG4gKiBATGFzdCBNb2RpZmllZCBUaW1lOiBNYXIgNiwgMjAxNyAxMjowMCBBTVxuICogQERlc2NyaXB0aW9uOiBDbGFzcyByZXByZXNlbnRpbmcgdGhlIHBvaW50IGluIGEgMkQgcGxhbmUgXG4gKi9cblxuXG5leHBvcnQgZnVuY3Rpb24gUG9pbnQoKXtcbiAgdGhpcy54ID0gdGhpcy55ID0wO1xuXG4gIHN3aXRjaChhcmd1bWVudHMubGVuZ3RoKXtcbiAgICBjYXNlIDA6XG4gICAgICBicmVhaztcbiAgICBjYXNlIDE6XG4gICAgICBpZiAodHlwZW9mKGFyZ3VtZW50c1swXSkgPT0gJ29iamVjdCcgK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HkyID0gdGhpcy55TWF4O1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGNvbnNvbGUubG9nKCdsaW5lKCAnICsgdGhpcy5wU3RhcnQueCArICcsJyArIHkxICsgJywnICsgdGhpcy5wRW5kLnggKyAnLCcgKyB5MiArICcpJyk7XG4gICAgICAgICAgaWYgKHRoaXMucFN0YXJ0LnggPCB0aGlzLnhNaW4gfHwgdGhpcy54TWF4IDwgdGhpcy5wRW5kLngpXG4gICAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgICAgZWxzZSBcbiAgICAgICAgICAgIHJldHVybiAgW3RoaXMucFN0YXJ0LngsIHkxLCB0aGlzLnBFbmQueCwgeTJdO1xuICAgICAgICB9XG4gICAgICAgIC8vaG9yaXpvbnRhbFxuICAgICAgICBpZiAoaSA+IDEpIHtcbiAgICAgICAgICBpZiAoeDEgPCB0aGlzLnhNaW4pIHtcbiAgICAgICAgICAgIHgxID0gdGhpcy54TWluO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmICh4MiA+IHRoaXMueE1heCkge1xuICAgICAgICAgICAgeDIgPSB0aGlzLnhNYXg7XG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbnNvbGUubG9nKCdsaW5lKCAnICsgeDEgKyAnLCcgKyB0aGlzLnBTdGFydC55ICsgJywnICsgeDIgKyAnLCcgKyB0aGlzLnBFbmQueSArICcpJyk7XG4gICAgICAgICAgaWYgKHRoaXMucFN0YXJ0LnkgPCB0aGlzLnlNaW4gfHwgdGhpcy55TWF4IDwgdGhpcy5wRW5kLnkpXG4gICAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgICAgZWxzZSBcbiAgICAgICAgICAgIHJldHVybiAgW3gxLCB0aGlzLnBTdGFydC55LCB4MiwgdGhpcy5wRW5kLnldO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgdmFyIHQxID0gMDtcbiAgdmFyIHQyID0gMTtcblxuICBmb3IgKHZhciBpID0gMDsgaSA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