vgl_homg_point_1d.hxx
Go to the documentation of this file.
1 // This is core/vgl/vgl_homg_point_1d.hxx
2 #ifndef vgl_homg_point_1d_hxx_
3 #define vgl_homg_point_1d_hxx_
4 
5 #include <iostream>
6 #include "vgl_homg_point_1d.h"
7 #ifdef _MSC_VER
8 # include <vcl_msvc_warnings.h>
9 #endif
10 
11 template <class Type>
12 std::ostream& operator<<(std::ostream& s, vgl_homg_point_1d<Type> const& p)
13 {
14  return s << "<vgl_homg_point_1d (" << p.x() << ',' << p.w() << ") > ";
15 }
16 
17 template <class Type>
18 std::istream& operator>>(std::istream& s, vgl_homg_point_1d<Type>& p)
19 {
20  Type x, w; s >> x >> w; p.set(x,w); return s;
21 }
22 
23 #undef VGL_HOMG_POINT_1D_INSTANTIATE
24 #define VGL_HOMG_POINT_1D_INSTANTIATE(T) \
25 template class vgl_homg_point_1d<T >; \
26 template std::ostream& operator<<(std::ostream&, vgl_homg_point_1d<T >const&); \
27 template std::istream& operator>>(std::istream&, vgl_homg_point_1d<T >&)
28 
29 #endif // vgl_homg_point_1d_hxx_
a point in homogeneous 1-D space, i.e., a homogeneous pair (x,w)
std::ostream & operator<<(std::ostream &s, vgl_orient_box_3d< Type > const &p)
Write box to stream.
void set(T px, T pw)
Set x,w.
std::istream & operator>>(std::istream &is, vgl_orient_box_3d< Type > &p)
Read box from stream.
Represents a homogeneous 1-D point, i.e., a homogeneous pair (x,w).
Definition: vgl_fwd.h:7