vgl_xio_box_3d.hxx
Go to the documentation of this file.
1 // This is core/vgl/xio/vgl_xio_box_3d.hxx
2 #ifndef vgl_xio_box_3d_hxx_
3 #define vgl_xio_box_3d_hxx_
4 //:
5 // \file
6 
7 #include "vgl_xio_box_3d.h"
8 #include <vgl/vgl_box_3d.h>
9 #include <vsl/vsl_basic_xml_element.h>
10 
11 //============================================================================
12 //: Binary save self to stream.
13 template<class T>
14 void x_write(std::ostream &os, const vgl_box_3d<T> & p, std::string element_name)
15 {
16  vsl_basic_xml_element xml_element(element_name);
17  xml_element.add_attribute("min_x", p.min_x());
18  xml_element.add_attribute("min_y", p.min_y());
19  xml_element.add_attribute("min_z", p.min_z());
20  xml_element.add_attribute("max_x", p.max_x());
21  xml_element.add_attribute("max_y", p.max_y());
22  xml_element.add_attribute("max_z", p.max_z());
23  xml_element.x_write(os);
24 }
25 
26 #define VGL_XIO_BOX_3D_INSTANTIATE(T) \
27 template void x_write(std::ostream &, const vgl_box_3d<T > &, std::string)
28 
29 #endif // vgl_xio_box_3d_hxx_
void x_write(std::ostream &os, const vgl_box_3d< T > &p, std::string element_name)
Binary save self to stream.
Type min_z() const
Get min z.
Definition: vgl_box_3d.h:128
Contains class to represent a cartesian 3D bounding box.
Type max_z() const
Get max z.
Definition: vgl_box_3d.h:135
Type max_y() const
Get max y.
Definition: vgl_box_3d.h:133
Type min_x() const
Get min x.
Definition: vgl_box_3d.h:124
Type min_y() const
Get min y.
Definition: vgl_box_3d.h:126
Represents a cartesian 3D box.
Definition: vgl_box_3d.h:65
Type max_x() const
Get max x.
Definition: vgl_box_3d.h:131