/usr/include/avogadro/navigate.h is in libavogadro-dev 1.0.3-1ubuntu4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | /**********************************************************************
Navigate - Navigation Functions for Avogadro
Copyright (C) 2007 by Marcus D. Hanwell
This file is part of the Avogadro molecular editor project.
For more information, see <http://avogadro.openmolecules.net/>
Avogadro is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Avogadro is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
**********************************************************************/
#ifndef NAVIGATE_H
#define NAVIGATE_H
#include <avogadro/global.h>
#include <avogadro/glwidget.h>
#include <avogadro/camera.h>
#include <QPoint>
namespace Avogadro {
/**
* @class Navigate navigate.h <avogadro/navigate.h>
* @brief Navigation functions to simplify common tasks.
* @author Marcus D. Hanwell
*
* This class contains navigation functions that are used
* by several tools.
*/
class A_EXPORT Navigate
{
public:
/**
* Constructor.
*/
Navigate();
/**
* Destructor.
*/
virtual ~Navigate();
/**
* Zooms toward a given point by the given amount.
* @param widget the GLWidget being operated on.
* @param goal the point that is being zoomed toward.
* @param delta the amount to zoom by.
*/
static void zoom(GLWidget *widget, const Eigen::Vector3d &goal,
double delta);
/**
* Translate between the from and to positions relative to what.
* @param widget the GLWidget being operated on.
* @param what the point that is being translated about.
* @param from the starting position.
* @param to the ending position.
*/
static void translate(GLWidget *widget, const Eigen::Vector3d &what,
const QPoint &from, const QPoint &to);
/**
* Translate between the from and to positions relative to what.
* @param widget the GLWidget being operated on.
* @param what the point that is being translated about.
* @param deltaX the amount to translate the x axis.
* @param deltaY the amount to translate the y axis.
*/
static void translate(GLWidget *widget, const Eigen::Vector3d &what,
double deltaX, double deltaY);
/**
* Rotate about center by the amounts deltaX and deltaY in tha x and y axes.
* @param widget the GLWidget being operated on.
* @param center the point at the center of rotation.
* @param deltaX the amount to rotate about the x axis in degrees.
* @param deltaY the amount to rotate about the y axis in degrees.
*/
static void rotate(GLWidget *widget, const Eigen::Vector3d ¢er,
double deltaX, double deltaY);
/**
* Tilt about center by the amount delta z axis.
* @param widget the GLWidget being operated on.
* @param center the point at the center of rotation.
* @param delta the amount to rotate about the z axis in degrees.
*/
static void tilt(GLWidget *widget, const Eigen::Vector3d ¢er,
double delta);
/**
* Rotate about center by deltaX, deltaY, and deltaZ in the x, y and z axes
* A generalization of the rotate() and tilt() methods.
* @param widget the GLWidget being operated on.
* @param center the point at the center of rotation.
* @param deltaX the amount to rotate about the x axis in degrees.
* @param deltaY the amount to rotate about the y axis in degrees.
* @param deltaZ the amount to rotate about the z axis in degrees.
*/
static void rotate(GLWidget *widget, const Eigen::Vector3d ¢er,
double deltaX, double deltaY, double deltaZ);
};
}
#endif
|