7 #ifndef BALL_MATHS_LINE3_H
8 #define BALL_MATHS_LINE3_H
10 #ifndef BALL_COMMON_EXCEPTION_H
14 #ifndef BALL_MATHS_VECTOR3_H
35 std::ostream& operator << (std::ostream& s, const TLine3<T>& line)
39 std::istream&
operator >> (std::istream& s, TLine3<T>& line)
148 line.
d = temp_vector;
254 return (
p == line.
p &&
d == line.
d);
263 return (
p != line.
p ||
d != line.
d);
274 T
c = (point.
x -
p.x) /
d.x;
282 T
c = (point.
y -
p.y) /
d.y;
323 void dump(std::ostream& s = std::cout,
Size depth = 0)
const
331 s <<
" position: " <<
p << std::endl;
334 s <<
" direction: " <<
d << std::endl;
365 template <
typename T>
370 s >> c >> line.
p >> line.
d >>
c;
381 template <
typename T>
382 std::ostream& operator << (std::ostream& s, const TLine3<T>& line)
385 s <<
'(' << line.p <<
' ' << line.d <<
')';
390 #endif // BALL_MATHS_LINE3_H