17 template <
typename Real>
24 Real rayParameter, rectangleParameter[2];
33 template <
typename Real>
42 auto lrResult = lrQuery(line, rectangle);
44 if (lrResult.lineParameter >= (Real)0)
46 result.distance = lrResult.distance;
47 result.sqrDistance = lrResult.sqrDistance;
48 result.rayParameter = lrResult.lineParameter;
49 result.rectangleParameter[0] = lrResult.rectangleParameter[0];
50 result.rectangleParameter[1] = lrResult.rectangleParameter[1];
51 result.closestPoint[0] = lrResult.closestPoint[0];
52 result.closestPoint[1] = lrResult.closestPoint[1];
57 auto prResult = prQuery(ray.origin, rectangle);
58 result.distance = prResult.distance;
59 result.sqrDistance = prResult.sqrDistance;
60 result.rayParameter = (Real)0;
61 result.rectangleParameter[0] = prResult.rectangleParameter[0];
62 result.rectangleParameter[1] = prResult.rectangleParameter[1];
63 result.closestPoint[0] = ray.origin;
64 result.closestPoint[1] = prResult.rectangleClosestPoint;
GLsizei GLsizei GLfloat distance
Result operator()(Type0 const &primitive0, Type1 const &primitive1)