vpgl_io_camera.cxx
Go to the documentation of this file.
1 #include "vpgl_io_camera.h"
2 //:
3 // \file
4 
5 //: Binary save camera sptr to stream
7 {
8  if (!cam_sptr) return;
9  vpgl_camera<double>* cam = cam_sptr.ptr();
10  vsl_b_write(os, cam);
11 }
12 
13 //: Binary save camera sptr to stream
15 {
16  if (!cam_sptr) return;
17  vpgl_camera<float>* cam = cam_sptr.ptr();
18  vsl_b_write(os, cam);
19 }
20 
21 //: Binary load camera from stream.
23 {
24  vpgl_camera<double>* cam = nullptr;
25  vsl_b_read(is, cam);
26  camera = cam;
27 }
28 
29 //: Binary load camera from stream.
31 {
32  vpgl_camera<float>* cam = nullptr;
33  vsl_b_read(is, cam);
34  camera = cam;
35 }
void vsl_b_write(vsl_b_ostream &os, vpgl_camera_double_sptr const &cam_sptr)
Binary save camera sptr to stream.
void vsl_b_read(vsl_b_istream &is, vpgl_camera_double_sptr &camera)
Binary load camera from stream.
T * ptr() const