16 template <
typename Real>
32 template <
typename Real>
41 segment.GetCenteredForm(segCenter, segDirection, segExtent);
45 auto lbResult = lbQuery(line, box);
47 if (lbResult.lineParameter >= -segExtent)
49 if (lbResult.lineParameter <= segExtent)
51 result.sqrDistance = lbResult.sqrDistance;
52 result.distance = lbResult.distance;
53 result.segmentParameter = lbResult.lineParameter;
54 result.closestPoint[0] = lbResult.closestPoint[0];
55 result.closestPoint[1] = lbResult.closestPoint[1];
61 auto pbResult = pbQuery(point, box);
62 result.sqrDistance = pbResult.sqrDistance;
63 result.distance = pbResult.distance;
64 result.segmentParameter = segExtent;
65 result.closestPoint[0] = point;
66 result.closestPoint[1] = pbResult.boxClosest;
73 auto pbResult = pbQuery(point, box);
74 result.sqrDistance = pbResult.sqrDistance;
75 result.distance = pbResult.distance;
76 result.segmentParameter = -segExtent;
77 result.closestPoint[0] = point;
78 result.closestPoint[1] = pbResult.boxClosest;
GLsizei GLsizei GLfloat distance
Result operator()(Type0 const &primitive0, Type1 const &primitive1)