Lines Matching defs:line
50 // Lines do not intersect if the other line's endpoints are on the same side
53 // Test line 0
55 const I64Vec2 line = line0End - line0Beg;
58 const deInt64 crossProduct0 = (line.x() * v0.y() - line.y() * v0.x());
59 const deInt64 crossProduct1 = (line.x() * v1.y() - line.y() * v1.x());
67 // Test line 1
69 const I64Vec2 line = line1End - line1Beg;
72 const deInt64 crossProduct0 = (line.x() * v0.y() - line.y() * v0.x());
73 const deInt64 crossProduct1 = (line.x() * v1.y() - line.y() * v1.x());
108 // "Near" = Distance from the line to the pixel is less than 2 * pixel_max_radius. (pixel_max_radius = sqrt(2) / 2)
112 // Near the line
114 const tcu::Vec2 line = p1 - p0;
116 const float crossProduct = (line.x() * v.y() - line.y() * v.x());
118 // distance to line: (line x v) / |line|
119 // |(line x v) / |line|| > maxPixelDistance
120 // ==> (line x v)^2 / |line|^2 > maxPixelDistance^2
121 // ==> (line x v)^2 > maxPixelDistance^2 * |line|^2
123 if (crossProduct * crossProduct > maxPixelDistanceSquared * tcu::lengthSquared(line))
129 // distance from line endpoint 1 to pixel is less than line length + maxPixelDistance
535 // calculate interpolation as a line
602 * correct line interpolations for the triangulated lines.
618 // in triangulation, one line emits two triangles
637 // calculate interpolation as a line
649 // convert to three-component form. For all triangles, the vertex 0 is always emitted by the line starting point, and vertex 2 by the ending point
866 float calculateIntersectionParameter (const tcu::Vec2 line[2], float w, int componentNdx)
869 if (line[1][componentNdx] == line[0][componentNdx])
872 return (w - line[0][componentNdx]) / (line[1][componentNdx] - line[0][componentNdx]);
875 // Clips the given line with a ((-w, -w), (-w, w), (w, w), (w, -w)) rectangle
876 void applyClippingBox (tcu::Vec2 line[2], float w)
882 const float t = calculateIntersectionParameter(line, w * (float)sign, component);
886 const float newCoord = t * line[1][1 - component] + (1 - t) * line[0][1 - component];
888 if (line[1][component] > (w * (float)sign))
890 line[1 - side / 2][component] = w * (float)sign;
891 line[1 - side / 2][1 - component] = newCoord;
895 line[side / 2][component] = w * (float)sign;
896 line[side / 2][1 - component] = newCoord;
920 // Multisampled line == 2 triangles
935 // reset stipple at the start of each line segment
976 // by the last line segment in the strip, if it wasn't an integer length.
1084 logStash->messages.push_back("Rasterization line draw strictness mode: " + std::string(strictMode ? "strict" : "non-strict") + ".");
1112 // Multisampled line == 2 triangles
1193 // Strict mode interpolation should be purely in the direction of the line-segment
1194 logStash.messages.push_back("Verify using line interpolator");
1202 // deconstruted parallelogram. Gradients along the line will be seen to travel in the major axis,
1204 // will use the original parameters of the line to calculate attribute interpolation so it will
1205 // follow the direction of the line-segment.
1209 logStash.messages.push_back("Verify using line interpolator");
1253 nonStrictModeLogStash.messages.push_back("Non-strict line draw mode.");
1254 strictModeLogStash.messages.push_back("Strict mode line draw mode.");
1282 // In the non-strict line case, bresenham is also permissable, though not specified. This is due
1288 log << tcu::TestLog::Message << "Checking line rasterisation using verifySinglesampleNarrowLineGroupInterpolation for nonStrict lines" << tcu::TestLog::EndMessage;
1372 // Reference renderer produces correct fragments using the diamond-rule. Make 2D int array, each cell contains the highest index (first index = 1) of the overlapping lines or 0 if no line intersects the pixel
1539 log << tcu::TestLog::Message << "Verifying line widths of the x-major lines." << tcu::TestLog::EndMessage;
1552 // Which line does this fragment belong to?
1574 // Another line is too close, don't try to calculate width here
1581 // Only line with id of lineID is nearby
1585 // The line might have been overdrawn or not
1593 // Current line continues
1598 // Another line was drawn over or the line ends
1605 // The line ends
1611 log << tcu::TestLog::Message << "\tInvalid line width at (" << x - currentWidth << ", " << y << ") - (" << x - 1 << ", " << y << "). Detected width of " << currentWidth << ", expected " << lineWidth << tcu::TestLog::EndMessage;
1623 log << tcu::TestLog::Message << "Verifying line widths of the y-major lines." << tcu::TestLog::EndMessage;
1636 // Which line does this fragment belong to?
1659 // Another line is too close, don't try to calculate width here
1666 // Only line with id of lineID is nearby
1670 // The line might have been overdrawn or not
1678 // Current line continues
1683 // Another line was drawn over or the line ends
1690 // The line ends
1696 log << tcu::TestLog::Message << "\tInvalid line width at (" << x << ", " << y - currentWidth << ") - (" << x << ", " << y - 1 << "). Detected width of " << currentWidth << ", expected " << lineWidth << tcu::TestLog::EndMessage;
1710 log << tcu::TestLog::Message << "Invalid line width found, image is not valid." << tcu::TestLog::EndMessage;
1720 //Requirement 4. If two line segments share a common endpoint, and both segments are either
1806 // verify line interpolation assuming line pixels are interpolated independently depending only on screen space location
1824 // Reference renderer produces correct fragments using the diamond-exit-rule. Make 2D int array, store line coverage as a 8-bit bitfield
1956 log << tcu::TestLog::Message << "\tCandidate (line " << candidate.lineNdx << "):\n"
2028 // return point on line at a given position on a given axis
2070 // for each line, for every distinct major direction fragment, store root pixel location (along
2080 // Reference renderer produces correct fragments using the diamond-exit-rule. Make 2D int array, store line coverage as a 8-bit bitfield
2087 // calculate mask and effective line coordinates
2102 // wide line interpolations are calculated for a line moved in minor direction
2118 // Calculate root pixel lookup table for this line. Since the implementation's fragment
2119 // major coordinate range might not be a subset of the correct line range (they are allowed
2123 // Expanding line strip to (effectively) infinite line might result in exit-diamnod set
2124 // that is not a superset of the exit-diamond set of the line strip. In practice, this
2126 // if the original and extended line would resolve differently a diamond the line just
2136 // Expand to effectively infinite line (endpoints are just one pixel over viewport boundaries)
2156 // infinite line will generate some diamonds outside the viewport
2211 // \note Wide line fragments are generated by replicating the root fragment for each
2327 msg << "\tCandidate line (line " << candidate.lineNdx << "):\n";
2461 // 3 subpixel tolerance around pixel center to account for accumulated errors during various line rasterization methods