• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdeedu
  • Sitemap
  • Contact Us
 

kalzium

color.h

Go to the documentation of this file.
00001 /**********************************************************************
00002   Color - Class for handling color changes in OpenGL
00003 
00004   Copyright (C) 2006 Benoit Jacob <jacob@math.jussieu.fr>
00005   Copyright (C) 2007 Geoffrey R. Hutchison <geoff@geoffhutchison.net>
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 __COLOR_H
00027 #define __COLOR_H
00028 
00029 #include <avogadro/global.h>
00030 
00031 #include <QGLWidget>
00032 #include <openbabel/mol.h>
00033 
00034 namespace Avogadro {
00035 
00041   class A_EXPORT Color
00042   {
00043   public:
00044     Color() {}
00045     virtual ~Color() {}
00046 
00052     Color( GLfloat red, GLfloat green, GLfloat blue,
00053         GLfloat alpha = 1.0 );
00054 
00058     Color( const OpenBabel::OBAtom *atom );
00059 
00062     Color &operator=( const Color& other );
00063 
00069     virtual void set(GLfloat red, GLfloat green, GLfloat blue,
00070                      GLfloat alpha = 1.0 );
00071 
00075     virtual void set(const OpenBabel::OBAtom *atom );
00076 
00081     virtual void set(double value, double low, double high);
00082 
00086     inline virtual void apply()
00087     {
00088       glColor4fv( &m_red );
00089     }
00090 
00095     virtual void applyAsMaterials();
00096 
00097   private:
00099     GLfloat m_red, m_green, m_blue, m_alpha;
00101   };
00102 
00103 }
00104 
00105 #endif

kalzium

Skip menu "kalzium"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
Generated for kdeedu by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal