chem3ddoc.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef GCU_CHEM3D_DOCUMENT_H
00026 #define GCU_CHEM3D_DOCUMENT_H
00027
00028 #include <gcu/macros.h>
00029 #include <gcu/gldocument.h>
00030 #include <openbabel/mol.h>
00031
00033 namespace gcu {
00034
00045 typedef enum
00046 {
00047 BALL_AND_STICK,
00048 SPACEFILL,
00049 CYLINDERS,
00050 WIREFRAME
00051 } Display3DMode;
00052
00053 class Application;
00054 class Matrix;
00055
00061 class Chem3dDoc: public GLDocument
00062 {
00063 public:
00067 Chem3dDoc ();
00072 Chem3dDoc (Application *App, GLView *View);
00076 virtual ~Chem3dDoc ();
00077
00083 void Draw (Matrix const &m) const;
00084
00088 bool IsEmpty () {return m_Mol.NumAtoms () == 0;}
00089
00096 void Load (char const *uri, char const *mime_type);
00097
00104 void LoadData (char const *data, char const *mime_type);
00105
00109 const char *GetTitle () {return m_Mol.GetTitle ();}
00110
00116 void OnExportVRML (std::string const &filename);
00117
00118 private:
00119 OpenBabel::OBMol m_Mol;
00120
00132 GCU_PROP (Display3DMode, Display3D);
00133 };
00134
00135 }
00136
00137 #endif // GCU_CHEM3D_DOCUMENT_H