Lines Matching refs:p2
40 this.p2 = vec2.create();
48 vec2.set(q.p2, x + w, y);
60 Quad.From4Vecs = function(p1, p2, p3, p4) { argument
63 vec2.set(q.p2, p2[0], p2[1]);
75 q.p2[0] = arr[2];
76 q.p2[1] = arr[3];
86 return vecInTriangle2(vec, this.p1, this.p2, this.p3) ||
91 var x0 = Math.min(this.p1[0], this.p2[0], this.p3[0], this.p4[0]);
92 var y0 = Math.min(this.p1[1], this.p2[1], this.p3[1], this.p4[1]);
94 var x1 = Math.max(this.p1[0], this.p2[0], this.p3[0], this.p4[0]);
95 var y1 = Math.max(this.p1[1], this.p2[1], this.p3[1], this.p4[1]);
103 vec2.copy(q.p2, this.p2);
117 vec2.copy(dstQuad.p2, this.p2, s);
128 bounds.width == this.p2[0] - this.p1[0] &&
129 bounds.y == this.p2[1] &&
131 bounds.height == this.p3[1] - this.p2[1] &&
133 bounds.height == this.p4[1] - this.p2[1]
150 vec2.sub(v12, this.p2, this.p1);
158 vec2.sub(v23, this.p3, this.p2);
183 vec2.add(dstQuad.p2, this.p2, tmpVec2a);
200 vec2.toString(this.p2) + ', ' +
206 function sign(p1, p2, p3) { argument
207 return (p1[0] - p3[0]) * (p2[1] - p3[1]) -
208 (p2[0] - p3[0]) * (p1[1] - p3[1]);
211 function vecInTriangle2(pt, p1, p2, p3) { argument
212 var b1 = sign(pt, p1, p2) < 0.0;
213 var b2 = sign(pt, p2, p3) < 0.0;