IMP logo
IMP Reference Guide  2.5.0
The Integrative Modeling Platform
geometry_io.h
Go to the documentation of this file.
1 /**
2  * \file IMP/rmf/geometry_io.h
3  * \brief Handle read/write of Model data from/to files.
4  *
5  * Copyright 2007-2015 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPRMF_GEOMETRY_IO_H
10 #define IMPRMF_GEOMETRY_IO_H
11 
12 #include <IMP/rmf/rmf_config.h>
14 #include <RMF/NodeHandle.h>
15 #include <RMF/FileHandle.h>
16 
17 IMPRMF_BEGIN_NAMESPACE
18 
19 /** \name Geometry I/O
20 
21  The geometry I/O support currently handles geometry composed of
22  - IMP::display::SegmentGeometry
23  - IMP::display::CylinderGeometry
24  - IMP::display::SphereGeometry
25 
26  Other types can be supported when requested. Be aware, many
27  more complex geometry types are automatically decomposed into
28  the above types and so, more or less, supported.
29  @{
30  */
31 /** Add the geometry to the file */
32 IMPRMFEXPORT void add_geometries(RMF::FileHandle file,
33  const display::GeometriesTemp &r);
34 
35 /** Add them to a given parent node.*/
36 IMPRMFEXPORT void add_geometries(RMF::NodeHandle parent,
37  const display::GeometriesTemp &r);
38 
39 /** Add the following geometry, assuming they do not move
40  between frames. This can be space saving compared to resaving
41  the constant position each frame.*/
42 IMPRMFEXPORT void add_static_geometries(RMF::FileHandle parent,
43  const display::GeometriesTemp &r);
44 
45 #ifndef IMP_DOXYGEN
46 IMPRMFEXPORT void add_geometry(RMF::FileHandle parent, display::Geometry *r);
47 #endif
48 
49 /** Create geometry objects for the geometry nodes found in the file.
50  */
51 IMPRMFEXPORT display::Geometries create_geometries(RMF::FileConstHandle parent);
52 
53 /** Link the passed geometry objects to corresponding ones in the file.
54  They must be in the same order, we don't search around for matches.*/
55 IMPRMFEXPORT void link_geometries(RMF::FileConstHandle parent,
56  const display::GeometriesTemp &r);
57 /** @} */
58 IMPRMF_END_NAMESPACE
59 
60 #endif /* IMPRMF_GEOMETRY_IO_H */
display::Geometries create_geometries(RMF::FileConstHandle parent)
Implement geometry for the basic shapes from IMP.algebra.
IMP::Vector< IMP::WeakPointer< Geometry > > GeometriesTemp
void link_geometries(RMF::FileConstHandle parent, const display::GeometriesTemp &r)
void add_geometries(RMF::NodeHandle parent, const display::GeometriesTemp &r)
IMP::Vector< IMP::Pointer< Geometry > > Geometries
void add_static_geometries(RMF::FileHandle parent, const display::GeometriesTemp &r)