Lines Matching refs:quad2
127 static bool checkParallel(skiatest::Reporter* reporter, const SkDQuad& quad1, const SkDQuad& quad2) {
130 setQuadHullSweep(quad2, tweep);
147 double mFactor = fabs(useS ? distEndRatio(sDist, quad1) : distEndRatio(tDist, quad2));
152 SkDVector m1 = quad2.ptAtT(0.5) - quad2[0];
162 const SkDQuad& quad2) {
165 setQuadHullSweep(quad2, tweep);
196 SkDVector m1 = quad2.ptAtT(0.5) - quad2[0];
205 return checkParallel(reporter, quad1, quad2);
226 static bool orderTRange(skiatest::Reporter* reporter, const SkDQuad& quad1, const SkDQuad& quad2,
230 orderQuads(reporter,quad2, r, &t2Array);
239 double a2 = quadAngle(reporter,quad2, t2);
283 static bool bruteMinT(skiatest::Reporter* reporter, const SkDQuad& quad1, const SkDQuad& quad2,
285 double maxRadius = SkTMin(maxDist(quad1), maxDist(quad2));
286 double maxQuads = SkTMax(maxQuad(quad1), maxQuad(quad2));
298 bool stepUp = orderTRange(reporter, quad1, quad2, r, &tRange);
305 SkDPoint pt2 = quad2.ptAtT(tRange.t2);
343 bool success = orderTRange(reporter, quad1, quad2, r, &tRange);
357 SkDPoint pt2 = quad2.ptAtT(tRange.t2);
389 static void bruteForce(skiatest::Reporter* reporter, const SkDQuad& quad1, const SkDQuad& quad2,
395 bool result = bruteMinT(reporter, quad1, quad2, &lowerRange, &upperRange);
402 const SkDQuad& quad2, bool ccw) {
404 bool result = bruteMinT(reporter, quad1, quad2, &lowerRange, &upperRange);
417 static void testQuadAngles(skiatest::Reporter* reporter, const SkDQuad& quad1, const SkDQuad& quad2,
433 REPORTER_ASSERT(reporter, origin == quad2[0]);
436 double a2s = atan2(origin.fY - quad2[1].fY, quad2[1].fX - origin.fX);
437 double a2e = atan2(origin.fY - quad2[2].fY, quad2[2].fX - origin.fX);
441 int overlap = quadHullsOverlap(reporter, quad1, quad2);
447 DumpQ(quad1, quad2, testNo);
451 overlap = quadHullsOverlap(reporter, quad1, quad2); // set a breakpoint and debug if assert fires
456 SkDVector v2s = quad2[1] - quad2[0];
457 SkDVector v2e = quad2[2] - quad2[0];
470 bruteForce(reporter, quad1, quad2, overlap > 0);
473 SkDLine rays[] = {{{origin, quad2[2]}}, {{origin, quad1[2]}}};
474 const SkDQuad* quads[] = {&quad1, &quad2};
545 firstInside = checkParallel(reporter, quad1, quad2);
553 bruteForce(reporter, quad1, quad2, firstInside);
582 SkDQuad quad2 = {{origin, {ran.nextRangeF(-1000, 1000), ran.nextRangeF(-1000, 1000)},
584 if (quad2[0] == quad2[2]) {
588 i.intersect(quad1, quad2);
593 testQuadAngles(reporter, quad1, quad2, index, &allocator);
612 SkDQuad quad2 = {{origin, {ran.nextRangeF(-1000, 1000), ran.nextRangeF(-1000, 1000)},
614 if (quad2[0] == quad2[2]) {
618 i.intersect(quad1, quad2);
624 bool result = bruteMinT(reporter, quad1, quad2, &lowerRange, &upperRange);
629 small[1] = quad2;
798 const SkDQuad& quad2 = extremeTests[index][1];
802 REPORTER_ASSERT(reporter, quad1[0] == quad2[0]);
804 i.intersect(quad1, quad2);
807 int overlap = quadHullsOverlap(reporter, quad1, quad2);
811 setQuadHullSweep(quad2, tweep);
815 bool agrees = bruteForceCheck(reporter, quad1, quad2, ccw);
816 maxR = SkTMin(maxR, mDistance(reporter, agrees, quad1, quad2));
820 midPointAgrees(reporter, quad1, quad2, !ccw);
822 SkDQuad q2 = quad2;
829 q2[1].fX = quad2[0].fX * (1 - hiPass) + quad2[1].fX * hiPass;
830 q2[1].fY = quad2[0].fY * (1 - hiPass) + quad2[1].fY * hiPass;
836 midPointAgrees(reporter, quad1, quad2, !ccw);
846 q2[1].fX = quad2[0].fX * (1 - midTest) + quad2[1].fX * midTest;
847 q2[1].fY = quad2[0].fY * (1 - midTest) + quad2[1].fY * midTest;
851 midPointAgrees(reporter, quad1, quad2, !ccw);