16 template <
typename Real>
33 template <
typename Real>
53 Real lineParameter[2], rayParameter[2];
61 template <
typename Real>
68 auto llResult = llQuery(line,
Line2<Real>(ray.origin, ray.direction));
69 if (llResult.numIntersections == 1)
72 if (llResult.line1Parameter[0] >= (Real)0)
74 result.intersect =
true;
75 result.numIntersections = 1;
79 result.intersect =
false;
80 result.numIntersections = 0;
85 result.intersect = llResult.intersect;
86 result.numIntersections = llResult.numIntersections;
91 template <
typename Real>
98 auto llResult = llQuery(line,
Line2<Real>(ray.origin, ray.direction));
99 if (llResult.numIntersections == 1)
102 if (llResult.line1Parameter[0] >= (Real)0)
104 result.intersect =
true;
105 result.numIntersections = 1;
106 result.lineParameter[0] = llResult.line0Parameter[0];
107 result.rayParameter[0] = llResult.line1Parameter[0];
108 result.point = llResult.point;
112 result.intersect =
false;
113 result.numIntersections = 0;
116 else if (llResult.numIntersections == std::numeric_limits<int>::max())
118 result.intersect =
true;
119 result.numIntersections = std::numeric_limits<int>::max();
120 Real maxReal = std::numeric_limits<Real>::max();
121 result.lineParameter[0] = -maxReal;
122 result.lineParameter[1] = +maxReal;
123 result.rayParameter[0] = (Real)0;
124 result.rayParameter[1] = +maxReal;
128 result.intersect =
false;
129 result.numIntersections = 0;
Result operator()(Type0 const &primitive0, Type1 const &primitive1)