Avogadro
1.1.0
|
00001 /********************************************************************** 00002 Navigate - Navigation Functions for Avogadro 00003 00004 Copyright (C) 2007 by Marcus D. Hanwell 00005 00006 This file is part of the Avogadro molecular editor project. 00007 For more information, see <http://avogadro.openmolecules.net/> 00008 00009 Avogadro is free software; you can redistribute it and/or modify 00010 it under the terms of the GNU General Public License as published by 00011 the Free Software Foundation; either version 2 of the License, or 00012 (at your option) any later version. 00013 00014 Avogadro is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with this program; if not, write to the Free Software 00021 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00022 02110-1301, USA. 00023 **********************************************************************/ 00024 00025 #ifndef NAVIGATE_H 00026 #define NAVIGATE_H 00027 00028 #include <avogadro/global.h> 00029 #include <avogadro/glwidget.h> 00030 #include <avogadro/camera.h> 00031 #include <QPoint> 00032 00033 namespace Avogadro { 00034 00043 class A_EXPORT Navigate 00044 { 00045 public: 00049 Navigate(); 00053 virtual ~Navigate(); 00054 00061 static void zoom(GLWidget *widget, const Eigen::Vector3d &goal, 00062 double delta); 00063 00071 static void translate(GLWidget *widget, const Eigen::Vector3d &what, 00072 const QPoint &from, const QPoint &to); 00073 00081 static void translate(GLWidget *widget, const Eigen::Vector3d &what, 00082 double deltaX, double deltaY); 00083 00091 static void rotate(GLWidget *widget, const Eigen::Vector3d ¢er, 00092 double deltaX, double deltaY); 00093 00100 static void tilt(GLWidget *widget, const Eigen::Vector3d ¢er, 00101 double delta); 00102 00112 static void rotate(GLWidget *widget, const Eigen::Vector3d ¢er, 00113 double deltaX, double deltaY, double deltaZ); 00114 }; 00115 00116 } 00117 #endif