22 template <
typename Real>
25 public TIQuery<Real, Line3<Real>, AlignedBox3<Real>>
30 public TIQuery<Real, Line3<Real>, AlignedBox3<Real>>::Result
43 template <
typename Real>
46 public FIQuery<Real, Line3<Real>, AlignedBox3<Real>>
51 public FIQuery<Real, Line3<Real>, AlignedBox3<Real>>::Result
65 template <
typename Real>
73 box.GetCenteredForm(boxCenter, boxExtent);
79 DoQuery(rayOrigin, ray.direction, boxExtent, result);
83 template <
typename Real>
88 for (
int i = 0; i < 3; ++i)
90 if (
std::abs(rayOrigin[i]) > boxExtent[i]
91 && rayOrigin[i] * rayDirection[i] >= (Real)0)
93 result.intersect =
false;
99 rayDirection, boxExtent, result);
102 template <
typename Real>
110 box.GetCenteredForm(boxCenter, boxExtent);
116 DoQuery(rayOrigin, ray.direction, boxExtent, result);
117 for (
int i = 0; i < result.numPoints; ++i)
120 ray.origin + result.lineParameter[i] * ray.direction;
125 template <
typename Real>
131 rayDirection, boxExtent, result);
133 if (result.intersect)
138 if (result.lineParameter[1] >= (Real)0)
140 if (result.lineParameter[0] < (Real)0)
142 result.lineParameter[0] = (Real)0;
147 result.intersect =
false;
148 result.numPoints = 0;
gte::BSNumber< UIntegerType > abs(gte::BSNumber< UIntegerType > const &number)
Result operator()(Type0 const &primitive0, Type1 const &primitive1)