1 #ifndef vgl_cylinder_hxx_ 2 #define vgl_cylinder_hxx_ 9 # include <vcl_msvc_warnings.h> 15 return (
this==&cyl) ||
16 ( cyl.
center_ == this->center_ &&
25 return s <<
"<vgl_cylinder center=" << center_ <<
',' 26 <<
" radius=" << radius_ <<
", length =" << length_
27 <<
", direction=" << orient_ << '>
'; 31 std::ostream& operator<<(std::ostream& os, const vgl_cylinder<T>& cyl) 37 std::istream& operator>>(std::istream& s, vgl_cylinder<T>& cyl) 39 T center_x, center_y, center_z, radius, length, orient_x, orient_y, orient_z; 40 s >> center_x >> center_y >> center_z >> radius >> length >> orient_x >> orient_y >> orient_z; 41 cyl.set_center(vgl_point_3d<T>(center_x,center_y,center_z)); 42 cyl.set_radius(radius); 43 cyl.set_length(length); 44 cyl.set_orientation(vgl_vector_3d<T>(orient_x,orient_y,orient_z)); 48 #undef VGL_CYLINDER_INSTANTIATE 49 #define VGL_CYLINDER_INSTANTIATE(T) \ 50 template class vgl_cylinder<T >; \ 51 template std::ostream& operator<<(std::ostream&, vgl_cylinder<T >const&); \ 52 template std::istream& operator>>(std::istream&, vgl_cylinder<T >&) 54 #endif // vgl_cylinder_hxx_ vgl_point_3d< Type > center_
bool operator==(vgl_cylinder< Type > const &cyl) const
operations.
defines a cylinder in 3D by a center point, radius, length and orientation
vgl_vector_3d< Type > orient_
std::ostream & print(std::ostream &s) const
Writes "<vgl_cylinder center=(x0,y0,z0), radius=r, length=l, direction=(x1,y1,z1)>" to stream.