17 template <
typename Real>
24 Real segmentParameter, triangleParameter[3];
33 template <
typename Real>
42 segment.GetCenteredForm(segCenter, segDirection, segExtent);
46 auto ltResult = ltQuery(line, triangle);
48 if (ltResult.lineParameter >= -segExtent)
50 if (ltResult.lineParameter <= segExtent)
52 result.distance = ltResult.distance;
53 result.sqrDistance = ltResult.sqrDistance;
54 result.segmentParameter = ltResult.lineParameter;
55 result.triangleParameter[0] = ltResult.triangleParameter[0];
56 result.triangleParameter[1] = ltResult.triangleParameter[1];
57 result.triangleParameter[2] = ltResult.triangleParameter[2];
58 result.closestPoint[0] = ltResult.closestPoint[0];
59 result.closestPoint[1] = ltResult.closestPoint[1];
65 auto ptResult = ptQuery(point, triangle);
66 result.sqrDistance = ptResult.sqrDistance;
67 result.distance = ptResult.distance;
68 result.segmentParameter = segExtent;
69 result.closestPoint[0] = point;
70 result.closestPoint[1] = ptResult.closest;
77 auto ptResult = ptQuery(point, triangle);
78 result.sqrDistance = ptResult.sqrDistance;
79 result.distance = ptResult.distance;
80 result.segmentParameter = segExtent;
81 result.closestPoint[0] = point;
82 result.closestPoint[1] = ptResult.closest;
GLsizei GLsizei GLfloat distance
Result operator()(Type0 const &primitive0, Type1 const &primitive1)