12 constexpr
short io_version_no = 1;
18 for (
unsigned int j=0;j<p[i].size();j++)
38 unsigned int num_sheets;
41 for (
unsigned int i=0;i<num_sheets;i++)
48 for (size_type j=0;j<npoints;j++)
57 std::cerr <<
"I/O ERROR: vsl_b_read(vsl_b_istream&, vgl_polygon<T>&)\n" 58 <<
" Unknown version number "<<
v <<
'\n';
59 is.is().clear(std::ios::badbit);
72 os<<
"Polygon with points defined by sheets :\n";
75 for (
unsigned int j=0;j<p[i].size();j++)
76 os << p[i][j].x()<<
','<<p[i][j].y()<<std::endl;
void new_sheet()
Add a new (empty) sheet to the polygon.
void vsl_b_read(vsl_b_istream &is, vgl_polygon< T > &p)
Binary load self from stream.
void push_back(T x, T y)
Add a new point to the last sheet.
void vsl_print_summary(std::ostream &os, vgl_polygon< T >const &p)
Output a human readable summary to the stream.
unsigned int num_sheets() const
void vsl_b_write(vsl_b_ostream &os, vgl_polygon< T > const &p)
Binary save self to stream.
void clear()
Set the number of sheets to zero, so the polygon becomes empty.