/
io.h
55 lines (44 loc) · 1.25 KB
/
io.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/**
* \file IMP/algebra/io.h
* \brief Classes to write entities in algebra to files.
*
* Copyright 2007-2022 IMP Inventors. All rights reserved.
*
*/
#ifndef IMPALGEBRA_IO_H
#define IMPALGEBRA_IO_H
#include "Vector3D.h"
#include "Sphere3D.h"
#include <IMP/file.h>
IMPALGEBRA_BEGIN_NAMESPACE
/** @name Simple geometric IO
These functions write geometry to text files, one line per
geometric primitive. Each line has the form \quote{x y z} for points or
\quote{x y z r} for spheres. We can easily add general dimension support
if requested..
Lines beginning with "#" are treated as comments.
@{
*/
//! Write a set of 3D vectors to a file
/** \see read_pts
\see VectorD
*/
IMPALGEBRAEXPORT void write_pts(const Vector3Ds &vs, TextOutput out);
//! Read a set of 3D vectors from a file
/** \see write_pts
\see VectorD
*/
IMPALGEBRAEXPORT Vector3Ds read_pts(TextInput input);
//! Write a set of 3D spheres to a file
/** \see read_pts
\see SphereD
*/
IMPALGEBRAEXPORT void write_spheres(const Sphere3Ds &vs, TextOutput out);
//! Read a set of 3D spheres from a file
/** \see write_pts
\see SphereD
*/
IMPALGEBRAEXPORT Sphere3Ds read_spheres(TextInput input);
/** @} */
IMPALGEBRA_END_NAMESPACE
#endif /* IMPALGEBRA_IO_H */