Lines Matching refs:line
149 // returns true if vertex is on the left side of the line
158 // returns true if vertex is on the right side of the line
167 // returns true if vertex is on the line
176 // returns true if vertex is on the line segment
208 // returns true if angle between line and given cornerExitNormal is in range (-45, 45)
209 bool lineInCornerAngleRange (const SubpixelLineSegment& line, const tcu::Vector<deInt64,2>& cornerExitNormal)
212 const tcu::Vector<deInt64,2> v = line.direction();
221 // returns true if angle between line and given cornerExitNormal is in range (-135, 135)
222 bool lineInCornerOutsideAngleRange (const SubpixelLineSegment& line, const tcu::Vector<deInt64,2>& cornerExitNormal)
225 const tcu::Vector<deInt64,2> v = line.direction();
234 bool doesLineSegmentExitDiamond (const SubpixelLineSegment& line, const tcu::Vector<deInt64,2>& diamondCenter, int bits)
244 const tcu::Vector<deInt64,2> u = line.direction();
245 const tcu::Vector<deInt64,2> v = (diamondCenter - line.m_v0);
296 CORNER_EDGE_CASE_NONE, // if the line intersects just a corner, no entering or exiting
297 CORNER_EDGE_CASE_HIT, // if the line intersects just a corner, entering and exit
298 CORNER_EDGE_CASE_HIT_FIRST_QUARTER, // if the line intersects just a corner and the line has either endpoint in (+X,-Y) direction (preturbing moves the line inside)
299 CORNER_EDGE_CASE_HIT_SECOND_QUARTER // if the line intersects just a corner and the line has either endpoint in (+X,+Y) direction (preturbing moves the line inside)
303 CORNER_START_CASE_NONE, // the line starting point is outside, no exiting
304 CORNER_START_CASE_OUTSIDE, // exit, if line does not intersect the region (preturbing moves the start point inside)
305 CORNER_START_CASE_POSITIVE_Y_45, // exit, if line the angle of line vector and X-axis is in range (0, 45] in positive Y side.
306 CORNER_START_CASE_NEGATIVE_Y_45 // exit, if line the angle of line vector and X-axis is in range [0, 45] in negative Y side.
310 CORNER_END_CASE_NONE, // end is inside, no exiting (preturbing moves the line end inside)
311 CORNER_END_CASE_DIRECTION, // exit, if line intersected the region (preturbing moves the line end outside)
312 CORNER_END_CASE_DIRECTION_AND_FIRST_QUARTER, // exit, if line intersected the region, or line originates from (+X,-Y) direction (preturbing moves the line end outside)
313 CORNER_END_CASE_DIRECTION_AND_SECOND_QUARTER // exit, if line intersected the region, or line originates from (+X,+Y) direction (preturbing moves the line end outside)
318 CORNER_EDGE_CASE_BEHAVIOR lineBehavior; // would a line segment going through this corner intersect with the region
333 const bool intersectsAtCorner = LineRasterUtil::vertexOnLineSegment(p, line);
338 // line segment body intersects with the corner
339 if (p != line.m_v0 && p != line.m_v1)
346 (line.direction().x() * line.direction().y()) <= 0)
351 (line.direction().x() * line.direction().y()) > 0)
355 // line exits the area at the corner
356 if (lineInCornerAngleRange(line, corners[ndx].dp))
358 const bool startIsInside = corners[ndx].pointInclusive || p != line.m_v0;
359 const bool endIsOutside = !corners[ndx].pointInclusive || p != line.m_v1;
366 // line end is at the corner
367 if (p == line.m_v1)
373 // did the line intersect the region
374 if (lineInCornerAngleRange(line, corners[ndx].dp))
380 line.direction().x() < 0 &&
381 line.direction().y() > 0)
384 line.direction().x() > 0 &&
385 line.direction().y() > 0)
389 // line start is at the corner
390 if (p == line.m_v0)
394 // if the line is not going inside, it will exit
395 if (lineInCornerOutsideAngleRange(line, corners[ndx].dp))
399 // exit, if line the angle between line vector and X-axis is in range (0, 45] in positive Y side.
401 line.direction().x() > 0 &&
402 line.direction().y() > 0 &&
403 line.direction().y() <= line.direction().x())
406 // exit, if line the angle between line vector and X-axis is in range [0, 45] in negative Y side.
408 line.direction().x() > 0 &&
409 line.direction().y() <= 0 &&
410 -line.direction().y() <= line.direction().x())
415 // Does the line intersect boundary at the left == exits the diamond
418 const bool startVertexInside = LineRasterUtil::vertexOnLeftSideOfLine (line.m_v0, LineRasterUtil::SubpixelLineSegment(bounds[ndx].p0, bounds[ndx].p1)) ||
419 (bounds[ndx].edgeInclusive && LineRasterUtil::vertexOnLine (line.m_v0, LineRasterUtil::SubpixelLineSegment(bounds[ndx].p0, bounds[ndx].p1)));
420 const bool endVertexInside = LineRasterUtil::vertexOnLeftSideOfLine (line.m_v1, LineRasterUtil::SubpixelLineSegment(bounds[ndx].p0, bounds[ndx].p1)) ||
421 (bounds[ndx].edgeInclusive && LineRasterUtil::vertexOnLine (line.m_v1, LineRasterUtil::SubpixelLineSegment(bounds[ndx].p0, bounds[ndx].p1)));
431 // Does the line via v0 and v1 intersect the line segment p0-p1
432 // <==> p0 and p1 are the different sides (LEFT, RIGHT) of the v0-v1 line.
434 LineRasterUtil::LINE_SIDE sideP0 = LineRasterUtil::getVertexSide(bounds[ndx].p0, line);
435 LineRasterUtil::LINE_SIDE sideP1 = LineRasterUtil::getVertexSide(bounds[ndx].p1, line);
875 // Bounding box \note: with wide lines, the line is actually moved as in the spec
885 // line endpoints might be perturbed, add some margin
945 const LineRasterUtil::SubpixelLineSegment line = LineRasterUtil::SubpixelLineSegment(pa, pb);
956 if (LineRasterUtil::doesLineSegmentExitDiamond(line, diamondPosition, m_subpixelBits))
995 // \note In order to make consistent output with multisampled line rasterization, output "barycentric" coordinates
1062 // Edge 0 -> 1 is always along the line and edge 1 -> 2 is in 90 degree angle to the line
1125 // line endpoints might be perturbed, add some margin
1149 const LineRasterUtil::SubpixelLineSegment line = LineRasterUtil::SubpixelLineSegment(pa, pb);
1157 if (LineRasterUtil::doesLineSegmentExitDiamond(line, diamondPosition, m_subpixelBits))