core/vgl/vgl_line_segment_3d.txx
Go to the documentation of this file.
00001 // This is core/vgl/vgl_line_segment_3d.txx
00002 #ifndef vgl_line_segment_3d_txx_
00003 #define vgl_line_segment_3d_txx_
00004 
00005 #include "vgl_line_segment_3d.h"
00006 
00007 #include <vcl_iostream.h>
00008 
00009 // stream operators
00010 template <class Type>
00011 vcl_ostream& operator<<(vcl_ostream& s, vgl_line_segment_3d<Type> const & p)
00012 {
00013   return s << "<vgl_line_segment_3d " << p.point1() << " to " << p.point2() << " >";
00014 }
00015 
00016 template <class Type>
00017 vcl_istream& operator>>(vcl_istream& s, vgl_line_segment_3d<Type>& p)
00018 {
00019   vgl_point_3d<Type> p1, p2;
00020   s >> p1 >> p2;
00021   p.set(p1, p2);
00022   return s;
00023 }
00024 
00025 #undef VGL_LINE_SEGMENT_3D_INSTANTIATE
00026 #define VGL_LINE_SEGMENT_3D_INSTANTIATE(Type) \
00027 template class vgl_line_segment_3d<Type >;\
00028 template vcl_istream& operator>>(vcl_istream&, vgl_line_segment_3d<Type >&);\
00029 template vcl_ostream& operator<<(vcl_ostream&, vgl_line_segment_3d<Type > const&)
00030 
00031 #endif // vgl_line_segment_3d_txx_