17 template <
typename Real>
33 template <
typename Real>
42 segment.GetCenteredForm(segCenter, segDirection, segExtent);
46 auto lrResult = lrQuery(line, rectangle);
48 if (lrResult.lineParameter >= -segExtent)
50 if (lrResult.lineParameter <= segExtent)
52 result.distance = lrResult.distance;
53 result.sqrDistance = lrResult.sqrDistance;
54 result.segmentParameter = lrResult.lineParameter;
55 result.rectangleParameter[0] = lrResult.rectangleParameter[0];
56 result.rectangleParameter[1] = lrResult.rectangleParameter[1];
57 result.closestPoint[0] = lrResult.closestPoint[0];
58 result.closestPoint[1] = lrResult.closestPoint[1];
64 auto prResult = prQuery(point, rectangle);
65 result.sqrDistance = prResult.sqrDistance;
66 result.distance = prResult.distance;
67 result.segmentParameter = segExtent;
68 result.closestPoint[0] = point;
69 result.closestPoint[1] = prResult.rectangleClosestPoint;
76 auto prResult = prQuery(point, rectangle);
77 result.sqrDistance = prResult.sqrDistance;
78 result.distance = prResult.distance;
79 result.segmentParameter = segExtent;
80 result.closestPoint[0] = point;
81 result.closestPoint[1] = prResult.rectangleClosestPoint;
GLsizei GLsizei GLfloat distance
Result operator()(Type0 const &primitive0, Type1 const &primitive1)