The Gnome Chemistry Utils
0.12.11
Main Page
Namespaces
Classes
Files
File List
File Members
libs
gcu
chem3ddoc.h
Go to the documentation of this file.
1
// -*- C++ -*-
2
3
/*
4
* Gnome Chemistry Utils
5
* gcu/chem3ddoc.h
6
*
7
* Copyright (C) 2006-2008 Jean Bréfort <jean.brefort@normalesup.org>
8
*
9
* This program is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU General Public License as
11
* published by the Free Software Foundation; either version 2 of the
12
* License, or (at your option) any later version.
13
*
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
18
*
19
* You should have received a copy of the GNU General Public License
20
* along with this program; if not, write to the Free Software
21
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
22
* USA
23
*/
24
25
#ifndef GCU_CHEM3D_DOCUMENT_H
26
#define GCU_CHEM3D_DOCUMENT_H
27
28
#include <
gcu/macros.h
>
29
#include <
gcu/gldocument.h
>
30
#include <
gcu/molecule.h
>
31
#include <openbabel/mol.h>
32
34
namespace
gcu {
35
46
typedef
enum
47
{
48
BALL_AND_STICK,
49
SPACEFILL,
50
CYLINDERS,
51
WIREFRAME
52
}
Display3DMode
;
53
54
class
Application;
55
class
Matrix;
56
62
class
Chem3dDoc
:
public
GLDocument
63
{
64
public
:
68
Chem3dDoc
();
73
Chem3dDoc
(
Application
*App,
GLView
*View);
77
virtual
~Chem3dDoc
();
78
84
void
Draw
(
Matrix
const
&m)
const
;
85
89
bool
IsEmpty
() {
return
!m_Mol || m_Mol->
GetAtomsNumber
() == 0;}
90
97
void
Load
(
char
const
*uri,
char
const
*mime_type);
98
105
void
LoadData
(
char
const
*data,
char
const
*mime_type);
106
112
void
OnExportVRML
(std::string
const
&filename);
113
117
void
Clear
();
118
119
private
:
120
Molecule
*m_Mol;
121
133
GCU_PROP
(
Display3DMode
, Display3D);
134
};
135
136
}
// namespace gcu
137
138
#endif // GCU_CHEM3D_DOCUMENT_H
Generated on Tue Jun 26 2012 08:44:53 for The Gnome Chemistry Utils by
1.8.1.1