21 template <
typename Real>
35 template <
typename Real>
46 Real center =
Dot(halfspace.normal, cylinder.axis.origin) -
48 Real absNdW =
std::abs(
Dot(halfspace.normal, cylinder.axis.direction));
49 Real root = sqrt(std::max((Real)1, (Real)1 - absNdW * absNdW));
50 Real tmax = center + cylinder.radius*root +
51 ((Real)0.5)*cylinder.height*absNdW;
55 result.intersect = (tmax >= (Real)0);
gte::BSNumber< UIntegerType > abs(gte::BSNumber< UIntegerType > const &number)
DualQuaternion< Real > Dot(DualQuaternion< Real > const &d0, DualQuaternion< Real > const &d1)
Result operator()(Type0 const &primitive0, Type1 const &primitive1)