19 template <
typename Real>
31 template <
typename Real>
51 template <
typename Real>
58 auto ppResult = ppQuery(sphere.center, plane);
59 result.intersect = (ppResult.distance <= sphere.radius);
64 template <
typename Real>
71 auto ppResult = ppQuery(sphere.center, plane);
72 if (ppResult.distance < sphere.radius)
74 result.intersect =
true;
75 result.isCircle =
true;
76 result.circle.center = sphere.center - ppResult.signedDistance * plane.normal;
77 result.circle.normal = plane.normal;
78 Real sum = sphere.radius + ppResult.distance;
79 Real dif = sphere.radius - ppResult.distance;
81 result.circle.radius = sqrt(arg);
84 else if (ppResult.distance == sphere.radius)
86 result.intersect =
true;
87 result.isCircle =
false;
88 result.point = sphere.center - ppResult.signedDistance * plane.normal;
93 result.intersect =
false;
Result operator()(Type0 const &primitive0, Type1 const &primitive1)