5 #ifndef BALL_MATHS_PLANE3_H
6 #define BALL_MATHS_PLANE3_H
8 #ifdef BALL_HAS_IEEEFP_H
15 #ifndef BALL_MATHS_LINE3_H
19 #ifndef BALL_MATHS_VECTOR3_H
23 #ifndef BALL_MATHS_COMMON_H
45 std::ostream& operator << (std::ostream& s, const TPlane3<T>& plane);
114 TPlane3(
const T& a,
const T& b,
const T&
c,
const T& d)
117 if (a == 0 && b == 0 && c == 0)
165 plane.
p = temp_point;
169 plane.
n = temp_point;
203 n = (a - b) % (b -
c);
253 T length =
n.getLength();
291 return (
p == plane.
p &&
n == plane.
n);
300 return (
p != plane.
p ||
n != plane.
n);
344 void dump(std::ostream& s = std::cout,
Size depth = 0)
const
352 s <<
" position: " <<
p << std::endl;
355 s <<
" normal: " <<
n << std::endl;
379 template <
typename T>
384 s >> c >> plane.
p >> plane.
n >>
c;
391 template <
typename T>
392 std::ostream& operator << (std::ostream& s, const TPlane3<T>& plane)
395 return (s <<
'(' << plane.p <<
' ' << plane.n <<
')');
405 #endif // BALL_MATHS_PLANE3_H