21 template <
typename Real>
33 template <
typename Real>
36 public FIQuery<Real, Line3<Real>, Capsule3<Real>>
41 public FIQuery<Real, Line3<Real>, Capsule3<Real>>::Result
55 template <
typename Real>
62 auto rsResult = rsQuery(ray, capsule.segment);
63 result.intersect = (rsResult.distance <= capsule.radius);
67 template <
typename Real>
73 DoQuery(ray.origin, ray.direction, capsule, result);
74 for (
int i = 0; i < result.numIntersections; ++i)
76 result.point[i] = ray.origin + result.parameter[i] * ray.direction;
81 template <
typename Real>
87 rayDirection, capsule, result);
94 std::array<Real, 2> rayInterval =
95 { (Real)0, std::numeric_limits<Real>::max() };
97 auto iiResult = iiQuery(result.parameter, rayInterval);
98 if (iiResult.intersect)
100 result.numIntersections = iiResult.numIntersections;
101 result.parameter = iiResult.overlap;
105 result.intersect =
false;
106 result.numIntersections = 0;
Result operator()(Type0 const &primitive0, Type1 const &primitive1)