18 template <
typename Real>
21 public FIQuery<Real, Line3<Real>, Cone3<Real>>
26 public FIQuery<Real, Line3<Real>, Cone3<Real>>::Result
40 template <
typename Real>
46 DoQuery(ray.origin, ray.direction, cone, result);
50 result.point[0] = ray.origin + result.parameter[0] * ray.direction;
51 result.point[1] = result.point[0];
54 result.point[0] = ray.origin + result.parameter[0] * ray.direction;
55 result.point[1] = ray.origin + result.parameter[1] * ray.direction;
58 result.point[0] = ray.origin + result.parameter[0] * ray.direction;
59 result.point[1] = ray.direction;
67 template <
typename Real>
73 rayDirection, cone, result);
80 std::array<Real, 2> rayInterval = {
81 (Real)0, std::numeric_limits<Real>::max() };
83 auto iiResult = iiQuery(result.parameter, rayInterval);
84 if (iiResult.intersect)
86 result.parameter = iiResult.overlap;
87 if (result.parameter[1] < std::numeric_limits<Real>::max())
89 result.type = iiResult.numIntersections;
98 result.intersect =
false;
Result operator()(Type0 const &primitive0, Type1 const &primitive1)