17 template <
typename Real>
32 template <
typename Real>
41 auto lbResult = lbQuery(line, box);
43 if (lbResult.lineParameter >= (Real)0)
45 result.sqrDistance = lbResult.sqrDistance;
46 result.distance = lbResult.distance;
47 result.rayParameter = lbResult.lineParameter;
48 result.closestPoint[0] = lbResult.closestPoint[0];
49 result.closestPoint[1] = lbResult.closestPoint[1];
54 auto pbResult = pbQuery(ray.origin, box);
55 result.sqrDistance = pbResult.sqrDistance;
56 result.distance = pbResult.distance;
57 result.rayParameter = (Real)0;
58 result.closestPoint[0] = ray.origin;
59 result.closestPoint[1] = pbResult.boxClosest;
GLsizei GLsizei GLfloat distance
Result operator()(Type0 const &primitive0, Type1 const &primitive1)