cylinder.h

Go to the documentation of this file.
00001 /**********************************************************************
00002   Cylinder - Class for drawing cylinders in OpenGL
00003 
00004   Copyright (C) 2007-2009 Jean Brefort <jean.brefort@normalesup.org>
00005   Copyright (C) 2006,2007 Benoit Jacob <jacob@math.jussieu.fr>
00006 
00007   This file is part of the Avogadro molecular editor project.
00008   For more information, see <http://avogadro.sourceforge.net/>
00009 
00010   Avogadro is free software; you can redistribute it and/or modify 
00011   it under the terms of the GNU General Public License as published by 
00012   the Free Software Foundation; either version 2 of the License, or 
00013   (at your option) any later version.
00014 
00015   Avogadro is distributed in the hope that it will be useful,
00016   but WITHOUT ANY WARRANTY; without even the implied warranty of
00017   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018   GNU General Public License for more details.
00019 
00020   You should have received a copy of the GNU General Public License
00021   along with this program; if not, write to the Free Software
00022   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00023   02110-1301, USA.
00024  **********************************************************************/
00025 
00026 #ifndef GCU_CYLINDER_H
00027 #define GCU_CYLINDER_H
00028 
00029 #include "vector.h"
00030 
00033 namespace gcu {
00034 
00041   class Vector;
00042   class CylinderPrivate;
00043   class Cylinder
00044   {
00045     protected:
00046       void initialize ();
00047       void freeBuffers ();
00048 
00049     public:
00050       Cylinder (int faces=0);
00051       ~Cylinder ();
00055       void setup (int faces);
00065       void draw (const Vector &end1, const Vector &end2,
00066           double radius) const;
00092       void drawMulti (const Vector &end1, const Vector &end2,
00093           double radius, int order, double shift,
00094           const Vector &planeNormalVector) const;
00095 
00096     private:
00097       CylinderPrivate * const d;
00098   };
00099 
00100 }
00101 
00102 #endif  //      GCU_CYLINDER_H

Generated on Fri Sep 24 15:58:41 2010 for The Gnome Chemistry Utils by  doxygen 1.5.9