1 #ifndef vgl_io_cylinder_hxx_ 2 #define vgl_io_cylinder_hxx_ 10 #include <vsl/vsl_binary_io.h> 17 constexpr
short io_version_no = 1;
57 std::cerr <<
"vsol_cylinder: unknown I/O version " << ver <<
'\n';
66 os <<
"Cylinder with center=" << cyl.
center() <<
" radius=" << cyl.
radius() <<
" length=" << cyl.
length() << std::endl;
69 #undef VGL_IO_CYLINDER_INSTANTIATE 70 #define VGL_IO_CYLINDER_INSTANTIATE(T) \ 71 template void vsl_print_summary(std::ostream &, const vgl_cylinder<T > &); \ 72 template void vsl_b_read(vsl_b_istream &, vgl_cylinder<T > &); \ 73 template void vsl_b_write(vsl_b_ostream &, const vgl_cylinder<T > &)
void set_length(Type len)
void vsl_b_read(vsl_b_istream &is, vgl_cylinder< T > &cyl)
Binary load self from stream.
Represents a cartesian 3D point.
double length(v const &a)
Return the length of a vector.
void set_center(vgl_point_3d< Type > cntr)
setters.
void vsl_print_summary(std::ostream &os, const vgl_cylinder< T > &cyl)
Print an ascii summary to the stream.
void set_radius(Type rad)
vgl_vector_3d< Type > orientation() const
void set_orientation(vgl_vector_3d< Type > orient)
vgl_point_3d< Type > center() const
getters.
Direction vector in Euclidean 3D space, templated by type of element.
defines a cylinder in 3D by a center point, radius, length and orientation
void vsl_b_write(vsl_b_ostream &os, const vgl_cylinder< T > &cyl)
Binary save self to stream.