IMP  2.0.1
The Integrative Modeling Platform
CMMWriter.h
Go to the documentation of this file.
1 /**
2  * \file IMP/display/CMMWriter.h
3  * \brief A writer for chimera CMM files.
4  *
5  * Copyright 2007-2013 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPDISPLAY_CMM_WRITER_H
9 #define IMPDISPLAY_CMM_WRITER_H
10 
11 #include <IMP/display/display_config.h>
12 #include "writer_macros.h"
13 
14 #include <IMP/PairContainer.h>
15 #include <IMP/SingletonContainer.h>
16 #include <IMP/display/Writer.h>
17 
18 IMPDISPLAY_BEGIN_NAMESPACE
19 #if IMP_HAS_DEPRECATED
20 //! Write a CMM file with the geometry
21 /** The CMM writer supports points and spheres. Cylinders can be added
22  at some point.
23 
24  This format creates one file per frame. So if you want to use frames
25  and save them all, make sure there is a "%1%" in the file name string
26  passed to the constructor.
27 
28  You are probably better off using the IMP::display::ChimeraWriter
29  which writes a python file, readable by Chimera as it supports
30  more types of geometry.
31 
32  \deprecated Use IMP::rmf for interfacing with Chimera.
33  */
34 class IMPDISPLAYEXPORT CMMWriter: public TextWriter
35 {
36  unsigned int marker_index_;
37  bool handle_sphere(SphereGeometry *g,
38  Color color, std::string name);
39  bool handle_point(PointGeometry *g,
40  Color color, std::string name);
41 public:
43  public:
44  unsigned int get_current_index() const {
45  return marker_index_;
46  }
47 };
48 #endif
49 
50 IMPDISPLAY_END_NAMESPACE
51 
52 #endif /* IMPDISPLAY_CMM_WRITER_H */