Avogadro
1.1.0
|
00001 /********************************************************************** 00002 GLHit - detect mouse clicks and the objects hit 00003 00004 Copyright (C) 2006-2009 Geoffrey R. Hutchison 00005 Copyright (C) 2006,2007 Donald Ephraim Curtis 00006 Copyright (C) 2007-2009 Marcus D. Hanwell 00007 00008 This file is part of the Avogadro molecular editor project. 00009 For more information, see <http://avogadro.openmolecules.net/> 00010 00011 Avogadro is free software; you can redistribute it and/or modify 00012 it under the terms of the GNU General Public License as published by 00013 the Free Software Foundation; either version 2 of the License, or 00014 (at your option) any later version. 00015 00016 Avogadro is distributed in the hope that it will be useful, 00017 but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 GNU General Public License for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with this program; if not, write to the Free Software 00023 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00024 02110-1301, USA. 00025 **********************************************************************/ 00026 00027 #ifndef GLHIT_H 00028 #define GLHIT_H 00029 00030 #include <avogadro/global.h> 00031 00032 #ifdef ENABLE_GLSL 00033 #include <GL/glew.h> 00034 #endif 00035 #include <QGLWidget> 00036 00037 namespace Avogadro { 00038 00049 class GLHitPrivate; 00050 class A_EXPORT GLHit 00051 { 00052 public: 00056 GLHit(); 00057 00061 GLHit(const GLHit &glHit); 00062 00074 GLHit(GLuint type, GLuint name, GLuint minZ, GLuint maxZ); 00075 00079 ~GLHit(); 00080 00086 bool operator<(const GLHit &other) const; 00087 00093 bool operator==(const GLHit &other) const; 00094 00100 GLHit &operator=(const GLHit &other); 00101 00105 GLuint type() const; 00106 00110 GLuint name() const; 00111 00116 GLuint minZ() const; 00117 00122 GLuint maxZ() const; 00123 00127 void setType(GLuint type); 00128 00132 void setName(GLuint name); 00133 00137 void setMinZ(GLuint minZ); 00138 00142 void setMaxZ(GLuint maxZ); 00143 00144 private: 00145 GLHitPrivate * const d; 00146 }; 00147 00148 } // End namespace Avogadro 00149 00150 #endif // GLHIT_H