Searched refs:cubic (Results 26 - 50 of 143) sorted by relevance

123456

/external/chromium_org/third_party/skia/experimental/Intersection/
H A DParameterization_Test.h10 bool point_on_parameterized_curve(const Cubic& cubic, const _Point& point);
H A DConvexHull.cpp11 /* Given a cubic, find the convex hull described by the end and control points.
22 int convex_hull(const Cubic& cubic, char order[4]) { argument
27 if (cubic[yMin].y > cubic[index].y || (cubic[yMin].y == cubic[index].y
28 && cubic[yMin].x > cubic[index].x)) {
47 if (!rotate(cubic, yMin, index, rotPath)) { // ! if cbc[yMin]==cbc[idx]
83 if (!rotate(cubic, leas
106 convex_x_hull(const Cubic& cubic, char connectTo0[2], char connectTo3[2]) argument
[all...]
H A DLineCubicIntersection.cpp13 Find the interection of a line and cubic by solving for valid t values.
15 Analogous to line-quadratic intersection, solve line-cubic intersection by
16 representing the cubic as:
24 Then using Mathematica, solve for the values of t where the cubic intersects the
54 instead, use Numeric Solutions recipe to solve the cubic.
76 So the cubic coefficients are:
84 : cubic(c)
95 r[n].x = (cubic[n].y - line[0].y) * adj - (cubic[n].x - line[0].x) * opp;
120 coefficients(&cubic[
254 const Cubic& cubic; member in class:LineCubicIntersections
259 horizontalIntersect(const Cubic& cubic, double left, double right, double y, double tRange[3]) argument
276 horizontalIntersect(const Cubic& cubic, double left, double right, double y, bool flipped, Intersections& intersections) argument
282 verticalIntersect(const Cubic& cubic, double top, double bottom, double x, bool flipped, Intersections& intersections) argument
288 intersect(const Cubic& cubic, const _Line& line, Intersections& i) argument
293 intersectRay(const Cubic& cubic, const _Line& line, Intersections& i) argument
[all...]
H A DLineParameteters_Test.cpp45 const Cubic& cubic = tests[index]; local
46 lineParameters.cubicEndPoints(cubic);
48 denormalizedDistance[0] = lineParameters.controlPtDistance(cubic, 1);
49 denormalizedDistance[1] = lineParameters.controlPtDistance(cubic, 2);
68 normalizedDistance[0] = lineParameters.controlPtDistance(cubic, 1);
69 normalizedDistance[1] = lineParameters.controlPtDistance(cubic, 2);
H A DLineCubicIntersection_Test.cpp14 Cubic cubic; member in struct:lineCubic
26 const Cubic& cubic = lineCubicTests[index].cubic; local
30 int order1 = reduceOrder(cubic, reduce1, kReduceOrder_NoQuadraticsAllowed,
34 printf("[%d] cubic order=%d\n", (int) index, order1);
47 xy_at_t(cubic, tt1, tx1, ty1);
/external/skia/experimental/Intersection/
H A DCubicReduceOrder_Test.cpp48 const Cubic& cubic = pointDegenerates[index]; local
49 order = reduceOrder(cubic, reduce, kReduceOrder_QuadraticsAllowed,
56 const Cubic& cubic = notPointDegenerates[index]; local
57 order = reduceOrder(cubic, reduce, kReduceOrder_QuadraticsAllowed,
64 const Cubic& cubic = lines[index]; local
65 order = reduceOrder(cubic, reduce, kReduceOrder_QuadraticsAllowed,
72 const Cubic& cubic = notLines[index]; local
73 order = reduceOrder(cubic, reduce, kReduceOrder_QuadraticsAllowed,
80 const Cubic& cubic = modEpsilonLines[index]; local
81 order = reduceOrder(cubic, reduc
88 const Cubic& cubic = lessEpsilonLines[index]; local
96 const Cubic& cubic = negEpsilonLines[index]; local
105 Cubic cubic; local
115 Cubic cubic; local
126 const Cubic& cubic = lines[index]; local
[all...]
H A DCubicUtilities.h13 double calcPrecision(const Cubic& cubic);
15 double calcPrecision(const Cubic& cubic, double t, double scale);
20 int cubic_to_quadratics(const Cubic& cubic, double precision,
22 void cubic_to_quadratics(const Cubic& cubic, double precision, SkTDArray<double>& ts);
23 void coefficients(const double* cubic, double& A, double& B, double& C, double& D);
27 void demote_cubic_to_quad(const Cubic& cubic, Quadratic& quad);
31 _Vector dxdy_at_t(const Cubic& cubic, double t);
36 bool rotate(const Cubic& cubic, int zero, int index, Cubic& rotPath);
H A DCubicUtilities_Test.cpp21 const Cubic& cubic = tests[index]; local
22 bool result = clockwise(cubic);
H A DParameterization_Test.h10 bool point_on_parameterized_curve(const Cubic& cubic, const _Point& point);
H A DConvexHull.cpp11 /* Given a cubic, find the convex hull described by the end and control points.
22 int convex_hull(const Cubic& cubic, char order[4]) { argument
27 if (cubic[yMin].y > cubic[index].y || (cubic[yMin].y == cubic[index].y
28 && cubic[yMin].x > cubic[index].x)) {
47 if (!rotate(cubic, yMin, index, rotPath)) { // ! if cbc[yMin]==cbc[idx]
83 if (!rotate(cubic, leas
106 convex_x_hull(const Cubic& cubic, char connectTo0[2], char connectTo3[2]) argument
[all...]
H A DLineCubicIntersection.cpp13 Find the interection of a line and cubic by solving for valid t values.
15 Analogous to line-quadratic intersection, solve line-cubic intersection by
16 representing the cubic as:
24 Then using Mathematica, solve for the values of t where the cubic intersects the
54 instead, use Numeric Solutions recipe to solve the cubic.
76 So the cubic coefficients are:
84 : cubic(c)
95 r[n].x = (cubic[n].y - line[0].y) * adj - (cubic[n].x - line[0].x) * opp;
120 coefficients(&cubic[
254 const Cubic& cubic; member in class:LineCubicIntersections
259 horizontalIntersect(const Cubic& cubic, double left, double right, double y, double tRange[3]) argument
276 horizontalIntersect(const Cubic& cubic, double left, double right, double y, bool flipped, Intersections& intersections) argument
282 verticalIntersect(const Cubic& cubic, double top, double bottom, double x, bool flipped, Intersections& intersections) argument
288 intersect(const Cubic& cubic, const _Line& line, Intersections& i) argument
293 intersectRay(const Cubic& cubic, const _Line& line, Intersections& i) argument
[all...]
H A DLineParameteters_Test.cpp45 const Cubic& cubic = tests[index]; local
46 lineParameters.cubicEndPoints(cubic);
48 denormalizedDistance[0] = lineParameters.controlPtDistance(cubic, 1);
49 denormalizedDistance[1] = lineParameters.controlPtDistance(cubic, 2);
68 normalizedDistance[0] = lineParameters.controlPtDistance(cubic, 1);
69 normalizedDistance[1] = lineParameters.controlPtDistance(cubic, 2);
H A DLineCubicIntersection_Test.cpp14 Cubic cubic; member in struct:lineCubic
26 const Cubic& cubic = lineCubicTests[index].cubic; local
30 int order1 = reduceOrder(cubic, reduce1, kReduceOrder_NoQuadraticsAllowed,
34 printf("[%d] cubic order=%d\n", (int) index, order1);
47 xy_at_t(cubic, tt1, tx1, ty1);
/external/chromium_org/third_party/skia/tests/
H A DPathOpsDRectTest.cpp82 const SkDCubic& cubic = cubicTests[index]; local
83 SkASSERT(ValidCubic(cubic));
84 rect.setRawBounds(cubic);
85 REPORTER_ASSERT(reporter, rect.fLeft == SkTMin(cubic[0].fX,
86 SkTMin(cubic[1].fX, SkTMin(cubic[2].fX, cubic[3].fX))));
87 REPORTER_ASSERT(reporter, rect.fTop == SkTMin(cubic[0].fY,
88 SkTMin(cubic[1].fY, SkTMin(cubic[
[all...]
H A DPathOpsLineParametetersTest.cpp43 const SkDCubic& cubic = tests[index]; local
44 SkASSERT(ValidCubic(cubic));
45 lineParameters.cubicEndPoints(cubic, 0, 3);
47 denormalizedDistance[0] = lineParameters.controlPtDistance(cubic, 1);
48 denormalizedDistance[1] = lineParameters.controlPtDistance(cubic, 2);
67 normalizedDistance[0] = lineParameters.controlPtDistance(cubic, 1);
68 normalizedDistance[1] = lineParameters.controlPtDistance(cubic, 2);
H A DPathOpsCubicLineIntersectionTest.cpp15 SkDCubic cubic; member in struct:lineCubic
28 const SkDCubic& cubic = failLineCubicTests[iIndex].cubic; local
29 SkASSERT(ValidCubic(cubic));
34 int order1 = reduce1.reduce(cubic, SkReduceOrder::kNo_Quadratics);
37 SkDebugf("[%d] cubic order=%d\n", iIndex, order1);
46 int roots = i.intersect(cubic, line);
93 static int doIntersect(SkIntersections& intersections, const SkDCubic& cubic, const SkDLine& line) { argument
103 result = intersections.vertical(cubic, top, bottom, line[0].fX, flipped);
111 result = intersections.horizontal(cubic, lef
120 const SkDCubic& cubic = lineCubicTests[iIndex].cubic; local
187 const SkDCubic& cubic = lineCubicTests[iIndex].cubic; local
[all...]
H A DPathOpsCubicQuadIntersectionTest.cpp16 SkDCubic cubic; member in struct:quadCubic
62 const SkDCubic& cubic = quadCubicTests[index].cubic; local
63 SkASSERT(ValidCubic(cubic));
68 int order1 = reduce1.reduce(cubic, SkReduceOrder::kNo_Quadratics);
71 SkDebugf("[%d] cubic order=%d\n", iIndex, order1);
79 int roots = i.intersect(cubic, quad);
83 SkDPoint xy1 = cubic.ptAtT(tt1);
116 static const int kCubicToQuadSubdivisionDepth = 8; // slots reserved for cubic to quads subdivision
121 // create a random non-selfintersecting cubic
140 SkDCubic cubic = {{ local
[all...]
/external/skia/tests/
H A DPathOpsDRectTest.cpp82 const SkDCubic& cubic = cubicTests[index]; local
83 SkASSERT(ValidCubic(cubic));
84 rect.setRawBounds(cubic);
85 REPORTER_ASSERT(reporter, rect.fLeft == SkTMin(cubic[0].fX,
86 SkTMin(cubic[1].fX, SkTMin(cubic[2].fX, cubic[3].fX))));
87 REPORTER_ASSERT(reporter, rect.fTop == SkTMin(cubic[0].fY,
88 SkTMin(cubic[1].fY, SkTMin(cubic[
[all...]
H A DPathOpsLineParametetersTest.cpp43 const SkDCubic& cubic = tests[index]; local
44 SkASSERT(ValidCubic(cubic));
45 lineParameters.cubicEndPoints(cubic, 0, 3);
47 denormalizedDistance[0] = lineParameters.controlPtDistance(cubic, 1);
48 denormalizedDistance[1] = lineParameters.controlPtDistance(cubic, 2);
67 normalizedDistance[0] = lineParameters.controlPtDistance(cubic, 1);
68 normalizedDistance[1] = lineParameters.controlPtDistance(cubic, 2);
H A DPathOpsCubicLineIntersectionTest.cpp15 SkDCubic cubic; member in struct:lineCubic
28 const SkDCubic& cubic = failLineCubicTests[iIndex].cubic; local
29 SkASSERT(ValidCubic(cubic));
34 int order1 = reduce1.reduce(cubic, SkReduceOrder::kNo_Quadratics);
37 SkDebugf("[%d] cubic order=%d\n", iIndex, order1);
46 int roots = i.intersect(cubic, line);
93 static int doIntersect(SkIntersections& intersections, const SkDCubic& cubic, const SkDLine& line) { argument
103 result = intersections.vertical(cubic, top, bottom, line[0].fX, flipped);
111 result = intersections.horizontal(cubic, lef
120 const SkDCubic& cubic = lineCubicTests[iIndex].cubic; local
187 const SkDCubic& cubic = lineCubicTests[iIndex].cubic; local
[all...]
H A DPathOpsCubicQuadIntersectionTest.cpp16 SkDCubic cubic; member in struct:quadCubic
62 const SkDCubic& cubic = quadCubicTests[index].cubic; local
63 SkASSERT(ValidCubic(cubic));
68 int order1 = reduce1.reduce(cubic, SkReduceOrder::kNo_Quadratics);
71 SkDebugf("[%d] cubic order=%d\n", iIndex, order1);
79 int roots = i.intersect(cubic, quad);
83 SkDPoint xy1 = cubic.ptAtT(tt1);
116 static const int kCubicToQuadSubdivisionDepth = 8; // slots reserved for cubic to quads subdivision
121 // create a random non-selfintersecting cubic
140 SkDCubic cubic = {{ local
[all...]
/external/chromium_org/third_party/skia/src/utils/win/
H A DSkDWriteGeometrySink.cpp90 static bool check_quadratic(const Cubic& cubic, Quadratic& reduction) { argument
91 float dx10 = cubic[1].x - cubic[0].x;
92 float dx23 = cubic[2].x - cubic[3].x;
93 float midX = cubic[0].x + dx10 * 3 / 2;
94 //NOTE: !approximately_equal(midX - cubic[3].x, dx23 * 3 / 2)
96 if (!approximately_equal(midX, (dx23 * 3 / 2) + cubic[3].x)) {
99 float dy10 = cubic[1].y - cubic[
118 Cubic cubic = { { prevPt.x, prevPt.y }, local
[all...]
/external/skia/src/utils/win/
H A DSkDWriteGeometrySink.cpp90 static bool check_quadratic(const Cubic& cubic, Quadratic& reduction) { argument
91 float dx10 = cubic[1].x - cubic[0].x;
92 float dx23 = cubic[2].x - cubic[3].x;
93 float midX = cubic[0].x + dx10 * 3 / 2;
94 //NOTE: !approximately_equal(midX - cubic[3].x, dx23 * 3 / 2)
96 if (!approximately_equal(midX, (dx23 * 3 / 2) + cubic[3].x)) {
99 float dy10 = cubic[1].y - cubic[
118 Cubic cubic = { { prevPt.x, prevPt.y }, local
[all...]
/external/chromium_org/third_party/skia/src/pathops/
H A DSkPathOpsCubic.h35 static void Coefficients(const double* cubic, double* A, double* B, double* C, double* D);
43 SkDCubic cubic; local
44 cubic.set(a);
45 return cubic.findInflections(tValues);
69 SkDCubic cubic; local
70 cubic.set(a);
71 return cubic.subDivide(t1, t2);
78 SkDCubic cubic; local
79 cubic.set(pts);
80 cubic
[all...]
/external/skia/src/pathops/
H A DSkPathOpsCubic.h35 static void Coefficients(const double* cubic, double* A, double* B, double* C, double* D);
43 SkDCubic cubic; local
44 cubic.set(a);
45 return cubic.findInflections(tValues);
69 SkDCubic cubic; local
70 cubic.set(a);
71 return cubic.subDivide(t1, t2);
78 SkDCubic cubic; local
79 cubic.set(pts);
80 cubic
[all...]

Completed in 2796 milliseconds

123456