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 <gcu/molecule.h>
00031 #include <openbabel/mol.h>
00032
00034 namespace gcu {
00035
00046 typedef enum
00047 {
00048 BALL_AND_STICK,
00049 SPACEFILL,
00050 CYLINDERS,
00051 WIREFRAME
00052 } Display3DMode;
00053
00054 class Application;
00055 class Matrix;
00056
00062 class Chem3dDoc: public GLDocument
00063 {
00064 public:
00068 Chem3dDoc ();
00073 Chem3dDoc (Application *App, GLView *View);
00077 virtual ~Chem3dDoc ();
00078
00084 void Draw (Matrix const &m) const;
00085
00089 bool IsEmpty () {return !m_Mol || m_Mol->GetAtomsNumber () == 0;}
00090
00097 void Load (char const *uri, char const *mime_type);
00098
00105 void LoadData (char const *data, char const *mime_type);
00106
00112 void OnExportVRML (std::string const &filename);
00113
00117 void Clear ();
00118
00119 private:
00120 Molecule *m_Mol;
00121
00133 GCU_PROP (Display3DMode, Display3D);
00134 };
00135
00136 }
00137
00138 #endif // GCU_CHEM3D_DOCUMENT_H