21 template <
typename Real>
34 template <
typename Real>
37 public FIQuery<Real, Line3<Real>, Capsule3<Real>>
42 public FIQuery<Real, Line3<Real>, Capsule3<Real>>::Result
57 template <
typename Real>
64 auto ssResult = ssQuery(segment, capsule.segment);
65 result.intersect = (ssResult.distance <= capsule.radius);
69 template <
typename Real>
76 segment.GetCenteredForm(segOrigin, segDirection, segExtent);
79 DoQuery(segOrigin, segDirection, segExtent, capsule, result);
80 for (
int i = 0; i < result.numIntersections; ++i)
82 result.point[i] = segOrigin + result.parameter[i] * segDirection;
87 template <
typename Real>
93 segDirection, capsule, result);
101 std::array<Real, 2> segInterval = { -segExtent, segExtent };
103 auto iiResult = iiQuery(result.parameter, segInterval);
104 if (iiResult.intersect)
106 result.numIntersections = iiResult.numIntersections;
107 result.parameter = iiResult.overlap;
111 result.intersect =
false;
112 result.numIntersections = 0;
Result operator()(Type0 const &primitive0, Type1 const &primitive1)