1 /**********************************************************************
2 global.h - Setup some default defines.
4 Copyright (C) 2007 by Donald Ephraim Curtis
6 This file is part of the Avogadro molecular editor project.
7 For more information, see <http://avogadro.sourceforge.net/>
9 Avogadro is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 Avogadro 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.
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 Street, Fifth Floor, Boston, MA
23 **********************************************************************/
28 #include <QTranslator>
37 # define A_DECL_IMPORT __declspec(dllimport)
38 # define A_DECL_EXPORT __declspec(dllexport)
40 # define A_DECL_IMPORT
41 # define A_DECL_EXPORT
45 # ifdef avogadro_lib_EXPORTS
46 # define A_EXPORT A_DECL_EXPORT
48 # define A_EXPORT A_DECL_IMPORT
54 #ifndef GL_RESCALE_NORMAL
55 # define GL_RESCALE_NORMAL 0x803A
58 #ifndef GL_COLOR_SUM_EXT
59 # define GL_COLOR_SUM_EXT 0x8458
62 #ifndef GL_LIGHT_MODEL_COLOR_CONTROL_EXT
63 # define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8
66 #ifndef GL_SEPARATE_SPECULAR_COLOR_EXT
67 # define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA
70 #ifndef GL_TEXTURE_RECTANGLE_ARB
71 # define GL_TEXTURE_RECTANGLE_ARB 0x84F5
74 const double ROTATION_SPEED
= 0.005;
75 const double ZOOM_SPEED
= 0.02;
76 const double MOUSE_WHEEL_SPEED
= 0.1;
77 const double CAMERA_MOL_RADIUS_MARGIN
= 10.0;
78 const double CAMERA_NEAR_DISTANCE
= 2.0;
79 const int SEL_BUF_MAX_SIZE
= 262144;
80 const int SEL_BUF_MARGIN
= 128;
81 const int SEL_BOX_HALF_SIZE
= 4;
82 const int SEL_BOX_SIZE
= 2 * SEL_BOX_HALF_SIZE
+ 1;
83 const double SEL_ATOM_EXTRA_RADIUS
= 0.18;
84 const double SEL_BOND_EXTRA_RADIUS
= 0.07;
88 class A_EXPORT Library
91 static QTranslator
*createTranslator();
92 static QString
version();
93 static QString
svnRevision();
94 static QString
prefix();