Flutter Engine
The Flutter Engine
Macros | Functions | Variables
PathOpsCubicIntersectionTest.cpp File Reference
#include "include/core/SkPoint.h"
#include "include/core/SkScalar.h"
#include "include/core/SkTypes.h"
#include "include/private/base/SkDebug.h"
#include "src/core/SkGeometry.h"
#include "src/pathops/SkIntersections.h"
#include "src/pathops/SkPathOpsCubic.h"
#include "src/pathops/SkPathOpsDebug.h"
#include "src/pathops/SkPathOpsPoint.h"
#include "src/pathops/SkPathOpsRect.h"
#include "src/pathops/SkPathOpsTypes.h"
#include "src/pathops/SkReduceOrder.h"
#include "tests/PathOpsCubicIntersectionTestData.h"
#include "tests/PathOpsTestCommon.h"
#include "tests/Test.h"
#include <array>
#include <cstdlib>

Go to the source code of this file.

Macros

#define DEBUG_CRASH   0
 

Functions

static void standardTestCases (skiatest::Reporter *reporter)
 
static void oneOff (skiatest::Reporter *reporter, const CubicPts &cubic1, const CubicPts &cubic2, bool coin)
 
static void oneOff (skiatest::Reporter *reporter, int outer, int inner)
 
static void newOneOff (skiatest::Reporter *reporter, int outer, int inner)
 
static void testsOneOff (skiatest::Reporter *reporter, int index)
 
static void oneOffTests (skiatest::Reporter *reporter)
 
static void CubicIntersection_RandTest (skiatest::Reporter *reporter)
 
static void intersectionFinder (int index0, int index1, double t1Seed, double t2Seed, double t1Step, double t2Step)
 
static void CubicIntersection_IntersectionFinder ()
 
static void selfOneOff (skiatest::Reporter *reporter, int setIdx)
 
static void cubicIntersectionSelfTest (skiatest::Reporter *reporter)
 
static void coinOneOff (skiatest::Reporter *reporter, int index)
 
static void cubicIntersectionCoinTest (skiatest::Reporter *reporter)
 
 DEF_TEST (PathOpsCubicCoinOneOff, reporter)
 
 DEF_TEST (PathOpsCubicIntersectionOneOff, reporter)
 
 DEF_TEST (PathOpsCubicIntersectionTestsOneOff, reporter)
 
 DEF_TEST (PathOpsCubicSelfOneOff, reporter)
 
 DEF_TEST (PathOpsCubicIntersection, reporter)
 

Variables

static constexpr int kFirstCubicIntersectionTest = 9
 
static const CubicPts testSet []
 
const int testSetCount = (int) std::size(testSet)
 
static const CubicPts newTestSet []
 
const int newTestSetCount = (int) std::size(newTestSet)
 
static const CubicPts selfSet []
 
int selfSetCount = (int) std::size(selfSet)
 
static const CubicPts coinSet []
 
static int coinSetCount = (int) std::size(coinSet)
 

Macro Definition Documentation

◆ DEBUG_CRASH

#define DEBUG_CRASH   0

Definition at line 477 of file PathOpsCubicIntersectionTest.cpp.

Function Documentation

◆ coinOneOff()

static void coinOneOff ( skiatest::Reporter reporter,
int  index 
)
static

Definition at line 708 of file PathOpsCubicIntersectionTest.cpp.

708 {
709 const CubicPts& cubic1 = coinSet[index];
710 const CubicPts& cubic2 = coinSet[index + 1];
711 oneOff(reporter, cubic1, cubic2, true);
712}
reporter
Definition: FontMgrTest.cpp:39
static const CubicPts coinSet[]
static void oneOff(skiatest::Reporter *reporter, const CubicPts &cubic1, const CubicPts &cubic2, bool coin)

◆ CubicIntersection_IntersectionFinder()

static void CubicIntersection_IntersectionFinder ( )
static

Definition at line 628 of file PathOpsCubicIntersectionTest.cpp.

628 {
629// double t1Seed = 0.87;
630// double t2Seed = 0.87;
631 double t1Step = 0.000001;
632 double t2Step = 0.000001;
633 intersectionFinder(0, 1, 0.855895664, 0.864850875, t1Step, t2Step);
634 intersectionFinder(0, 1, 0.865207906, 0.865207887, t1Step, t2Step);
635 intersectionFinder(0, 1, 0.865213351, 0.865208087, t1Step, t2Step);
636}
static void intersectionFinder(int index0, int index1, double t1Seed, double t2Seed, double t1Step, double t2Step)

◆ CubicIntersection_RandTest()

static void CubicIntersection_RandTest ( skiatest::Reporter reporter)
static

Definition at line 479 of file PathOpsCubicIntersectionTest.cpp.

479 {
480 srand(0);
481 const int kNumTests = 10000000;
482#if !defined(SK_BUILD_FOR_WIN) && !defined(SK_BUILD_FOR_ANDROID)
483 unsigned seed = 0;
484#endif
485 for (int test = 0; test < kNumTests; ++test) {
486 CubicPts cubic1, cubic2;
487 for (int i = 0; i < 4; ++i) {
488 cubic1.fPts[i].fX = static_cast<double>(SK_RAND(seed)) / RAND_MAX * 100;
489 cubic1.fPts[i].fY = static_cast<double>(SK_RAND(seed)) / RAND_MAX * 100;
490 cubic2.fPts[i].fX = static_cast<double>(SK_RAND(seed)) / RAND_MAX * 100;
491 cubic2.fPts[i].fY = static_cast<double>(SK_RAND(seed)) / RAND_MAX * 100;
492 }
493 #if DEBUG_CRASH
494 char str[1024];
495 snprintf(str, sizeof(str),
496 "{{{%1.9g, %1.9g}, {%1.9g, %1.9g}, {%1.9g, %1.9g}, {%1.9g, %1.9g}}},\n"
497 "{{{%1.9g, %1.9g}, {%1.9g, %1.9g}, {%1.9g, %1.9g}, {%1.9g, %1.9g}}},\n",
498 cubic1[0].fX, cubic1[0].fY, cubic1[1].fX, cubic1[1].fY, cubic1[2].fX, cubic1[2].fY,
499 cubic1[3].fX, cubic1[3].fY,
500 cubic2[0].fX, cubic2[0].fY, cubic2[1].fX, cubic2[1].fY, cubic2[2].fX, cubic2[2].fY,
501 cubic2[3].fX, cubic2[3].fY);
502 #endif
503 SkDRect rect1, rect2;
504 SkDCubic c1, c2;
505 c1.debugSet(cubic1.fPts);
506 c2.debugSet(cubic2.fPts);
507 rect1.setBounds(c1);
508 rect2.setBounds(c2);
509 bool boundsIntersect = rect1.fLeft <= rect2.fRight && rect2.fLeft <= rect2.fRight
510 && rect1.fTop <= rect2.fBottom && rect2.fTop <= rect1.fBottom;
511 if (test == -1) {
512 SkDebugf("ready...\n");
513 }
514 SkIntersections intersections2;
515 int newIntersects = intersections2.intersect(c1, c2);
516 if (!boundsIntersect && newIntersects) {
517 #if DEBUG_CRASH
518 SkDebugf("%s %d unexpected intersection boundsIntersect=%d "
519 " newIntersects=%d\n%s %s\n", __FUNCTION__, test, boundsIntersect,
520 newIntersects, __FUNCTION__, str);
521 #endif
523 }
524 for (int pt = 0; pt < intersections2.used(); ++pt) {
525 double tt1 = intersections2[0][pt];
526 SkDPoint xy1 = c1.ptAtT(tt1);
527 double tt2 = intersections2[1][pt];
528 SkDPoint xy2 = c2.ptAtT(tt2);
530 }
531 reporter->bumpTestCount();
532 }
533}
#define test(name)
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
#define SK_RAND(seed)
#define REPORTER_ASSERT(r, cond,...)
Definition: Test.h:286
int intersect(const SkDLine &, const SkDLine &)
int used() const
SkDPoint fPts[kPointCount]
void debugSet(const SkDPoint *pts)
SkDPoint ptAtT(double t) const
bool approximatelyEqual(const SkDPoint &a) const
double fTop
Definition: SkPathOpsRect.h:22
double fRight
Definition: SkPathOpsRect.h:22
double fBottom
Definition: SkPathOpsRect.h:22
void setBounds(const SkDConic &curve)
Definition: SkPathOpsRect.h:59
double fLeft
Definition: SkPathOpsRect.h:22

◆ cubicIntersectionCoinTest()

static void cubicIntersectionCoinTest ( skiatest::Reporter reporter)
static

Definition at line 714 of file PathOpsCubicIntersectionTest.cpp.

714 {
715 int firstFail = 0;
716 for (int index = firstFail; index < coinSetCount; index += 2) {
717 coinOneOff(reporter, index);
718 }
719}
static void coinOneOff(skiatest::Reporter *reporter, int index)
static int coinSetCount

◆ cubicIntersectionSelfTest()

static void cubicIntersectionSelfTest ( skiatest::Reporter reporter)
static

Definition at line 680 of file PathOpsCubicIntersectionTest.cpp.

680 {
681 int firstFail = 0;
682 for (int index = firstFail; index < selfSetCount; ++index) {
683 selfOneOff(reporter, index);
684 }
685}
static void selfOneOff(skiatest::Reporter *reporter, int setIdx)

◆ DEF_TEST() [1/5]

DEF_TEST ( PathOpsCubicCoinOneOff  ,
reporter   
)

Definition at line 721 of file PathOpsCubicIntersectionTest.cpp.

721 {
723}

◆ DEF_TEST() [2/5]

DEF_TEST ( PathOpsCubicIntersection  ,
reporter   
)

Definition at line 737 of file PathOpsCubicIntersectionTest.cpp.

737 {
744}
static void standardTestCases(skiatest::Reporter *reporter)
static void CubicIntersection_IntersectionFinder()
static void oneOffTests(skiatest::Reporter *reporter)
static void cubicIntersectionCoinTest(skiatest::Reporter *reporter)
static void cubicIntersectionSelfTest(skiatest::Reporter *reporter)
static void CubicIntersection_RandTest(skiatest::Reporter *reporter)

◆ DEF_TEST() [3/5]

DEF_TEST ( PathOpsCubicIntersectionOneOff  ,
reporter   
)

Definition at line 725 of file PathOpsCubicIntersectionTest.cpp.

725 {
726 newOneOff(reporter, 0, 1);
727}
static void newOneOff(skiatest::Reporter *reporter, int outer, int inner)

◆ DEF_TEST() [4/5]

DEF_TEST ( PathOpsCubicIntersectionTestsOneOff  ,
reporter   
)

Definition at line 729 of file PathOpsCubicIntersectionTest.cpp.

729 {
731}
static void testsOneOff(skiatest::Reporter *reporter, int index)

◆ DEF_TEST() [5/5]

DEF_TEST ( PathOpsCubicSelfOneOff  ,
reporter   
)

Definition at line 733 of file PathOpsCubicIntersectionTest.cpp.

733 {
735}

◆ intersectionFinder()

static void intersectionFinder ( int  index0,
int  index1,
double  t1Seed,
double  t2Seed,
double  t1Step,
double  t2Step 
)
static

Definition at line 535 of file PathOpsCubicIntersectionTest.cpp.

536 {
537 const CubicPts& cubic1 = newTestSet[index0];
538 const CubicPts& cubic2 = newTestSet[index1];
539 SkDPoint t1[3], t2[3];
540 bool toggle = true;
541 SkDCubic c1, c2;
542 c1.debugSet(cubic1.fPts);
543 c2.debugSet(cubic2.fPts);
544 do {
545 t1[0] = c1.ptAtT(t1Seed - t1Step);
546 t1[1] = c1.ptAtT(t1Seed);
547 t1[2] = c1.ptAtT(t1Seed + t1Step);
548 t2[0] = c2.ptAtT(t2Seed - t2Step);
549 t2[1] = c2.ptAtT(t2Seed);
550 t2[2] = c2.ptAtT(t2Seed + t2Step);
551 double dist[3][3];
552 dist[1][1] = t1[1].distance(t2[1]);
553 int best_i = 1, best_j = 1;
554 for (int i = 0; i < 3; ++i) {
555 for (int j = 0; j < 3; ++j) {
556 if (i == 1 && j == 1) {
557 continue;
558 }
559 dist[i][j] = t1[i].distance(t2[j]);
560 if (dist[best_i][best_j] > dist[i][j]) {
561 best_i = i;
562 best_j = j;
563 }
564 }
565 }
566 if (best_i == 0) {
567 t1Seed -= t1Step;
568 } else if (best_i == 2) {
569 t1Seed += t1Step;
570 }
571 if (best_j == 0) {
572 t2Seed -= t2Step;
573 } else if (best_j == 2) {
574 t2Seed += t2Step;
575 }
576 if (best_i == 1 && best_j == 1) {
577 if ((toggle ^= true)) {
578 t1Step /= 2;
579 } else {
580 t2Step /= 2;
581 }
582 }
583 } while (!t1[1].approximatelyEqual(t2[1]));
584 t1Step = t2Step = 0.1;
585 double t10 = t1Seed - t1Step * 2;
586 double t12 = t1Seed + t1Step * 2;
587 double t20 = t2Seed - t2Step * 2;
588 double t22 = t2Seed + t2Step * 2;
590 while (!approximately_zero(t1Step)) {
591 test = c1.ptAtT(t10);
592 t10 += t1[1].approximatelyEqual(test) ? -t1Step : t1Step;
593 t1Step /= 2;
594 }
595 t1Step = 0.1;
596 while (!approximately_zero(t1Step)) {
597 test = c1.ptAtT(t12);
598 t12 -= t1[1].approximatelyEqual(test) ? -t1Step : t1Step;
599 t1Step /= 2;
600 }
601 while (!approximately_zero(t2Step)) {
602 test = c2.ptAtT(t20);
603 t20 += t2[1].approximatelyEqual(test) ? -t2Step : t2Step;
604 t2Step /= 2;
605 }
606 t2Step = 0.1;
607 while (!approximately_zero(t2Step)) {
608 test = c2.ptAtT(t22);
609 t22 -= t2[1].approximatelyEqual(test) ? -t2Step : t2Step;
610 t2Step /= 2;
611 }
612#if ONE_OFF_DEBUG
613 SkDebugf("%s t1=(%1.9g<%1.9g<%1.9g) t2=(%1.9g<%1.9g<%1.9g)\n", __FUNCTION__,
614 t10, t1Seed, t12, t20, t2Seed, t22);
615 SkDPoint p10 = c1.ptAtT(t10);
616 SkDPoint p1Seed = c1.ptAtT(t1Seed);
617 SkDPoint p12 = c1.ptAtT(t12);
618 SkDebugf("%s p1=(%1.9g,%1.9g)<(%1.9g,%1.9g)<(%1.9g,%1.9g)\n", __FUNCTION__,
619 p10.fX, p10.fY, p1Seed.fX, p1Seed.fY, p12.fX, p12.fY);
620 SkDPoint p20 = c2.ptAtT(t20);
621 SkDPoint p2Seed = c2.ptAtT(t2Seed);
622 SkDPoint p22 = c2.ptAtT(t22);
623 SkDebugf("%s p2=(%1.9g,%1.9g)<(%1.9g,%1.9g)<(%1.9g,%1.9g)\n", __FUNCTION__,
624 p20.fX, p20.fY, p2Seed.fX, p2Seed.fY, p22.fX, p22.fY);
625#endif
626}
static const CubicPts newTestSet[]
static bool approximately_zero(double x)
Definition: SkCubics.cpp:153
double distance(const SkDPoint &a) const

◆ newOneOff()

static void newOneOff ( skiatest::Reporter reporter,
int  outer,
int  inner 
)
static

Definition at line 452 of file PathOpsCubicIntersectionTest.cpp.

452 {
453 const CubicPts& cubic1 = newTestSet[outer];
454 const CubicPts& cubic2 = newTestSet[inner];
455 oneOff(reporter, cubic1, cubic2, false);
456}

◆ oneOff() [1/2]

static void oneOff ( skiatest::Reporter reporter,
const CubicPts cubic1,
const CubicPts cubic2,
bool  coin 
)
static

Definition at line 399 of file PathOpsCubicIntersectionTest.cpp.

400 {
401 SkDCubic c1, c2;
402 c1.debugSet(cubic1.fPts);
403 c2.debugSet(cubic2.fPts);
404 SkASSERT(ValidCubic(c1));
405 SkASSERT(ValidCubic(c2));
406#if ONE_OFF_DEBUG
407 SkDebugf("computed quadratics given\n");
408 SkDebugf(" {{%1.9g,%1.9g}, {%1.9g,%1.9g}, {%1.9g,%1.9g}, {%1.9g,%1.9g}},\n",
409 cubic1[0].fX, cubic1[0].fY, cubic1[1].fX, cubic1[1].fY,
410 cubic1[2].fX, cubic1[2].fY, cubic1[3].fX, cubic1[3].fY);
411 SkDebugf(" {{%1.9g,%1.9g}, {%1.9g,%1.9g}, {%1.9g,%1.9g}, {%1.9g,%1.9g}},\n",
412 cubic2[0].fX, cubic2[0].fY, cubic2[1].fX, cubic2[1].fY,
413 cubic2[2].fX, cubic2[2].fY, cubic2[3].fX, cubic2[3].fY);
414#endif
415 SkIntersections intersections;
416 intersections.intersect(c1, c2);
417#if DEBUG_T_SECT_DUMP == 3
418 SkDebugf("</div>\n\n");
419 SkDebugf("<script type=\"text/javascript\">\n\n");
420 SkDebugf("var testDivs = [\n");
421 for (int index = 1; index <= gDumpTSectNum; ++index) {
422 SkDebugf("sect%d,\n", index);
423 }
424#endif
425 REPORTER_ASSERT(reporter, !coin || intersections.used() >= 2);
426 double tt1, tt2;
427 SkDPoint xy1, xy2;
428 for (int pt3 = 0; pt3 < intersections.used(); ++pt3) {
429 tt1 = intersections[0][pt3];
430 xy1 = c1.ptAtT(tt1);
431 tt2 = intersections[1][pt3];
432 xy2 = c2.ptAtT(tt2);
433 const SkDPoint& iPt = intersections.pt(pt3);
434#if ONE_OFF_DEBUG
435 SkDebugf("%s t1=%1.9g (%1.9g, %1.9g) (%1.9g, %1.9g) (%1.9g, %1.9g) t2=%1.9g\n",
436 __FUNCTION__, tt1, xy1.fX, xy1.fY, iPt.fX,
437 iPt.fY, xy2.fX, xy2.fY, tt2);
438#endif
442 }
443 reporter->bumpTestCount();
444}
int gDumpTSectNum
bool ValidCubic(const SkDCubic &cubic)
#define SkASSERT(cond)
Definition: SkAssert.h:116
const SkDPoint & pt(int index) const

◆ oneOff() [2/2]

static void oneOff ( skiatest::Reporter reporter,
int  outer,
int  inner 
)
static

Definition at line 446 of file PathOpsCubicIntersectionTest.cpp.

446 {
447 const CubicPts& cubic1 = testSet[outer];
448 const CubicPts& cubic2 = testSet[inner];
449 oneOff(reporter, cubic1, cubic2, false);
450}
static const CubicPts testSet[]

◆ oneOffTests()

static void oneOffTests ( skiatest::Reporter reporter)
static

Definition at line 464 of file PathOpsCubicIntersectionTest.cpp.

464 {
465 for (int outer = 0; outer < testSetCount - 1; ++outer) {
466 for (int inner = outer + 1; inner < testSetCount; ++inner) {
467 oneOff(reporter, outer, inner);
468 }
469 }
470 for (int outer = 0; outer < newTestSetCount - 1; ++outer) {
471 for (int inner = outer + 1; inner < newTestSetCount; ++inner) {
472 newOneOff(reporter, outer, inner);
473 }
474 }
475}
const int newTestSetCount
const int testSetCount

◆ selfOneOff()

static void selfOneOff ( skiatest::Reporter reporter,
int  setIdx 
)
static

Definition at line 651 of file PathOpsCubicIntersectionTest.cpp.

651 {
652 const CubicPts& cubic = selfSet[setIdx];
653 SkPoint c[4];
654 for (int i = 0; i < 4; ++i) {
655 c[i] = cubic.fPts[i].asSkPoint();
656 }
657 SkScalar loopT[3];
658 SkCubicType cubicType = SkClassifyCubic(c);
659 int breaks = SkDCubic::ComplexBreak(c, loopT);
660 SkASSERT(breaks < 2);
661 if (breaks && cubicType == SkCubicType::kLoop) {
663 SkPoint twoCubics[7];
664 SkChopCubicAt(c, twoCubics, loopT[0]);
665 SkDCubic chopped[2];
666 chopped[0].set(&twoCubics[0]);
667 chopped[1].set(&twoCubics[3]);
668 int result = i.intersect(chopped[0], chopped[1]);
670 REPORTER_ASSERT(reporter, i.used() == 2);
671 for (int index = 0; index < result; ++index) {
672 SkDPoint pt1 = chopped[0].ptAtT(i[0][index]);
673 SkDPoint pt2 = chopped[1].ptAtT(i[1][index]);
675 reporter->bumpTestCount();
676 }
677 }
678}
static const CubicPts selfSet[]
void SkChopCubicAt(const SkPoint src[4], SkPoint dst[7], SkScalar t)
Definition: SkGeometry.cpp:473
SkCubicType SkClassifyCubic(const SkPoint P[4], double t[2], double s[2], double d[4])
Definition: SkGeometry.cpp:809
SkCubicType
Definition: SkGeometry.h:264
float SkScalar
Definition: extension.cpp:12
GAsyncResult * result
AI float cubic(float precision, const SkPoint pts[], const VectorXform &vectorXform=VectorXform())
Definition: WangsFormula.h:195
const SkDCubic & set(const SkPoint pts[kPointCount] SkDEBUGPARAMS(SkOpGlobalState *state=nullptr))
static int ComplexBreak(const SkPoint pts[4], SkScalar *t)

◆ standardTestCases()

static void standardTestCases ( skiatest::Reporter reporter)
static

Definition at line 30 of file PathOpsCubicIntersectionTest.cpp.

30 {
31 for (size_t index = kFirstCubicIntersectionTest; index < tests_count; ++index) {
32 int iIndex = static_cast<int>(index);
33 const CubicPts& cubic1 = tests[index][0];
34 const CubicPts& cubic2 = tests[index][1];
35 SkDCubic c1, c2;
36 c1.debugSet(cubic1.fPts);
37 c2.debugSet(cubic2.fPts);
38 SkReduceOrder reduce1, reduce2;
39 int order1 = reduce1.reduce(c1, SkReduceOrder::kNo_Quadratics);
40 int order2 = reduce2.reduce(c2, SkReduceOrder::kNo_Quadratics);
41 const bool showSkipped = false;
42 if (order1 < 4) {
43 if (showSkipped) {
44 SkDebugf("%s [%d] cubic1 order=%d\n", __FUNCTION__, iIndex, order1);
45 }
46 continue;
47 }
48 if (order2 < 4) {
49 if (showSkipped) {
50 SkDebugf("%s [%d] cubic2 order=%d\n", __FUNCTION__, iIndex, order2);
51 }
52 continue;
53 }
54 SkIntersections tIntersections;
55 tIntersections.intersect(c1, c2);
56 if (!tIntersections.used()) {
57 if (showSkipped) {
58 SkDebugf("%s [%d] no intersection\n", __FUNCTION__, iIndex);
59 }
60 continue;
61 }
62 if (tIntersections.isCoincident(0)) {
63 if (showSkipped) {
64 SkDebugf("%s [%d] coincident\n", __FUNCTION__, iIndex);
65 }
66 continue;
67 }
68 for (int pt = 0; pt < tIntersections.used(); ++pt) {
69 double tt1 = tIntersections[0][pt];
70 SkDPoint xy1 = c1.ptAtT(tt1);
71 double tt2 = tIntersections[1][pt];
72 SkDPoint xy2 = c2.ptAtT(tt2);
73 if (!xy1.approximatelyEqual(xy2)) {
74 SkDebugf("%s [%d,%d] x!= t1=%g (%g,%g) t2=%g (%g,%g)\n",
75 __FUNCTION__, (int)index, pt, tt1, xy1.fX, xy1.fY, tt2, xy2.fX, xy2.fY);
76 }
78 }
79 reporter->bumpTestCount();
80 }
81}
static BlurTest tests[]
Definition: BlurTest.cpp:84
static constexpr int kFirstCubicIntersectionTest
bool isCoincident(int index)
int reduce(const SkDCubic &cubic, Quadratics)

◆ testsOneOff()

static void testsOneOff ( skiatest::Reporter reporter,
int  index 
)
static

Definition at line 458 of file PathOpsCubicIntersectionTest.cpp.

458 {
459 const CubicPts& cubic1 = tests[index][0];
460 const CubicPts& cubic2 = tests[index][1];
461 oneOff(reporter, cubic1, cubic2, false);
462}

Variable Documentation

◆ coinSet

const CubicPts coinSet[]
static
Initial value:
= {
{{{72.350448608398438, 27.966041564941406}, {72.58441162109375, 27.861515045166016},
{72.818222045898437, 27.756658554077148}, {73.394996643066406, 27.49799919128418}}},
{{{73.394996643066406, 27.49799919128418}, {72.818222045898437, 27.756658554077148},
{72.58441162109375, 27.861515045166016}, {72.350448608398438, 27.966041564941406}}},
{{{297.04998779296875, 43.928997039794922}, {297.04998779296875, 43.928997039794922},
{300.69699096679688, 45.391998291015625}, {306.92498779296875, 43.08599853515625}}},
{{{297.04998779296875, 43.928997039794922}, {297.04998779296875, 43.928997039794922},
{300.69699096679688, 45.391998291015625}, {306.92498779296875, 43.08599853515625}}},
{{{2, 3}, {0, 4}, {3, 2}, {5, 3}}},
{{{2, 3}, {0, 4}, {3, 2}, {5, 3}}},
{{{317, 711}, {322.52285766601562, 711}, {327, 715.4771728515625}, {327, 721}}},
{{{324.07107543945312, 713.928955078125}, {324.4051513671875, 714.26300048828125},
{324.71566772460937, 714.62060546875}, {325, 714.9990234375}}},
}

Definition at line 687 of file PathOpsCubicIntersectionTest.cpp.

◆ coinSetCount

int coinSetCount = (int) std::size(coinSet)
static

Definition at line 706 of file PathOpsCubicIntersectionTest.cpp.

◆ kFirstCubicIntersectionTest

constexpr int kFirstCubicIntersectionTest = 9
staticconstexpr

Definition at line 28 of file PathOpsCubicIntersectionTest.cpp.

◆ newTestSet

const CubicPts newTestSet[]
static

Definition at line 181 of file PathOpsCubicIntersectionTest.cpp.

◆ newTestSetCount

const int newTestSetCount = (int) std::size(newTestSet)

Definition at line 398 of file PathOpsCubicIntersectionTest.cpp.

◆ selfSet

const CubicPts selfSet[]
static
Initial value:
= {
{{{2, 3}, {0, 4}, {3, 2}, {5, 3}}},
{{{3, 6}, {2, 3}, {4, 0}, {3, 2}}},
{{{0, 2}, {2, 3}, {5, 1}, {3, 2}}},
{{{0, 2}, {3, 5}, {5, 0}, {4, 2}}},
{{{3.34, 8.98}, {1.95, 10.27}, {3.76, 7.65}, {4.96, 10.64}}},
{{{3.13, 2.74}, {1.08, 4.62}, {3.71, 0.94}, {2.01, 3.81}}},
{{{6.71, 3.14}, {7.99, 2.75}, {8.27, 1.96}, {6.35, 3.57}}},
{{{12.81, 7.27}, {7.22, 6.98}, {12.49, 8.97}, {11.42, 6.18}}},
}

Definition at line 638 of file PathOpsCubicIntersectionTest.cpp.

◆ selfSetCount

int selfSetCount = (int) std::size(selfSet)

Definition at line 649 of file PathOpsCubicIntersectionTest.cpp.

◆ testSet

const CubicPts testSet[]
static

Definition at line 83 of file PathOpsCubicIntersectionTest.cpp.

◆ testSetCount

const int testSetCount = (int) std::size(testSet)

Definition at line 179 of file PathOpsCubicIntersectionTest.cpp.