The Gnome Chemistry Utils  0.14.0
cylinder.h
Go to the documentation of this file.
1 /**********************************************************************
2  Cylinder - Class for drawing cylinders in OpenGL
3 
4  Copyright (C) 2007-2009 Jean Brefort <jean.brefort@normalesup.org>
5  Copyright (C) 2006,2007 Benoit Jacob <jacob@math.jussieu.fr>
6 
7  This file is part of the Avogadro molecular editor project.
8  For more information, see <http://avogadro.sourceforge.net/>
9 
10  Avogadro is free software; you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation; either version 3 of the License, or
13  (at your option) any later version.
14 
15  Avogadro is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with this program; if not, write to the Free Software
22  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23  02110-1301, USA.
24  **********************************************************************/
25 
26 #ifndef GCU_CYLINDER_H
27 #define GCU_CYLINDER_H
28 
29 #include "vector.h"
30 
33 namespace gcu {
34 
40  class Vector;
41  class CylinderPrivate;
42  class Cylinder
43  {
44  private:
45  void initialize ();
46  void freeBuffers ();
47 
48  public:
50  Cylinder (int faces=0);
51  ~Cylinder ();
55  void setup (int faces);
65  void draw (const Vector &end1, const Vector &end2,
66  double radius) const;
92  void drawMulti (const Vector &end1, const Vector &end2,
93  double radius, int order, double shift,
94  const Vector &planeNormalVector) const;
95 
96  private:
97  CylinderPrivate * const d;
98  };
99 
100 }
101 
102 #endif // GCU_CYLINDER_H