19 template <
typename Real>
31 template <
typename Real>
51 template <
typename Real>
67 Real dot =
Dot(plane0.normal, plane1.normal);
70 result.intersect =
true;
79 cDiff = plane0.constant - plane1.constant;
84 cDiff = plane0.constant + plane1.constant;
87 result.intersect = (
std::abs(cDiff) == (Real)0);
93 template <
typename Real>
114 Real dot =
Dot(plane0.normal, plane1.normal);
122 cDiff = plane0.constant - plane1.constant;
127 cDiff = plane0.constant + plane1.constant;
133 result.intersect =
true;
134 result.isLine =
false;
135 result.plane = plane0;
140 result.intersect =
false;
144 Real invDet = ((Real)1) / ((Real)1 - dot*dot);
145 Real c0 = (plane0.constant - dot*plane1.constant)*invDet;
146 Real c1 = (plane1.constant - dot*plane0.constant)*invDet;
147 result.intersect =
true;
148 result.isLine =
true;
149 result.line.origin = c0*plane0.normal + c1*plane1.normal;
150 result.line.direction =
UnitCross(plane0.normal, plane1.normal);
gte::BSNumber< UIntegerType > abs(gte::BSNumber< UIntegerType > const &number)
Vector< N, Real > UnitCross(Vector< N, Real > const &v0, Vector< N, Real > const &v1, bool robust=false)
DualQuaternion< Real > Dot(DualQuaternion< Real > const &d0, DualQuaternion< Real > const &d1)
Result operator()(Type0 const &primitive0, Type1 const &primitive1)