/** * \file algebra/io.h \brief Classes to write entities in algebra to files. * * Copyright 2007-2010 IMP Inventors. All rights reserved. * */ #ifndef IMPALGEBRA_IO_H #define IMPALGEBRA_IO_H #include "Vector3D.h" #include "Sphere3D.h" #include 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 \relatesalso VectorD */ IMPALGEBRAEXPORT void write_pts(const std::vector > &vs, TextOutput out); //! Read a set of 3D vectors from a file /** \see write_pts \relatesalso VectorD */ IMPALGEBRAEXPORT std::vector > read_pts(TextInput in); //! Write a set of 3d spheres to a file /** \see read_pts \relatesalso SphereD */ IMPALGEBRAEXPORT void write_spheres(const std::vector > &vs, TextOutput out); //! Read a set of 3d spheres from a file /** \see write_pts \relatesalso SphereD */ IMPALGEBRAEXPORT std::vector > read_spheres(TextInput in); /** @} */ IMPALGEBRA_END_NAMESPACE #endif /* IMPALGEBRA_IO_H */