IMP  2.1.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_DEPRECATED_HEADER(2.1, "Use IMP.rmf")
19 
20 IMPDISPLAY_BEGIN_NAMESPACE
21 //! Write a CMM file with the geometry
22 /** The CMM writer supports points and spheres. Cylinders can be added
23  at some point.
24 
25  This format creates one file per frame. So if you want to use frames
26  and save them all, make sure there is a "%1%" in the file name string
27  passed to the constructor.
28 
29  You are probably better off using the IMP::display::ChimeraWriter
30  which writes a python file, readable by Chimera as it supports
31  more types of geometry.
32 
33  \deprecated_at{2.1} Use IMP::rmf for interfacing with Chimera.
34  */
35 class IMPDISPLAYEXPORT CMMWriter : public TextWriter {
36  unsigned int marker_index_;
37  bool handle_sphere(SphereGeometry *g, Color color, std::string name);
38  bool handle_point(PointGeometry *g, Color color, std::string name);
39 
40  public:
41  IMPDISPLAY_DEPRECATED_OBJECT_DECL(2.1)
43 
44  public:
45  unsigned int get_current_index() const { return marker_index_; }
46 };
47 
48 IMPDISPLAY_END_NAMESPACE
49 
50 #endif /* IMPDISPLAY_CMM_WRITER_H */
Represent an RGB color.
Definition: Color.h:24
Import IMP/kernel/SingletonContainer.h in the namespace.
Write a CMM file with the geometry.
Definition: CMMWriter.h:35
macros for display classes
Import IMP/kernel/PairContainer.h in the namespace.
Base class for writing geometry to a file.
#define IMP_TEXT_WRITER(Name)
Define information for an TextWriter object.
Definition: writer_macros.h:16