2 #ifndef vgl_io_box_2d_hxx_ 3 #define vgl_io_box_2d_hxx_ 9 #include <vsl/vsl_binary_io.h> 16 constexpr
short io_version_no = 1;
50 std::cerr <<
"I/O ERROR: vsl_b_read(vsl_b_istream&, vgl_box_2d<T>&)\n" 51 <<
" Unknown version number "<<
v <<
'\n';
52 is.is().clear(std::ios::badbit);
65 os<<
"2d box with opposite corners at (" <<p.
min_x() <<
',' << p.
min_y()
66 <<
") and (" << p.
max_x() <<
',' << p.
max_y() <<
")\n";
69 #define VGL_IO_BOX_2D_INSTANTIATE(T) \ 70 template void vsl_print_summary(std::ostream &, const vgl_box_2d<T > &); \ 71 template void vsl_b_read(vsl_b_istream &, vgl_box_2d<T > &); \ 72 template void vsl_b_write(vsl_b_ostream &, const vgl_box_2d<T > &) 74 #endif // vgl_io_box_2d_hxx_ Type min_x() const
Get min x.
void set_max_y(Type m)
Set top (other side ordinates unchanged).
void set_max_x(Type m)
Set right side (other side ordinates unchanged).
void vsl_print_summary(std::ostream &os, const vgl_box_2d< T > &p)
Output a human readable summary to the stream.
Type min_y() const
Get min y.
void set_min_x(Type m)
Set left side of box (other side ordinates unchanged).
Type max_y() const
Get max y.
Type max_x() const
Get max x.
void vsl_b_read(vsl_b_istream &is, vgl_box_2d< T > &p)
Binary load self from stream.
bool is_empty() const
Return true if this box is empty.
void vsl_b_write(vsl_b_ostream &os, const vgl_box_2d< T > &p)
Binary save self to stream.
void set_min_y(Type m)
Set bottom of box (other side ordinates unchanged).