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