/usr/include/tulip/QtGlSceneZoomAndPanAnimator.h is in libtulip-dev 4.4.0dfsg2-2.
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 | /*
*
* This file is part of Tulip (www.tulip-software.org)
*
* Authors: David Auber and the Tulip development Team
* from LaBRI, University of Bordeaux 1 and Inria Bordeaux - Sud Ouest
*
* Tulip is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation, either version 3
* of the License, or (at your option) any later version.
*
* Tulip 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.
*
*/
#ifndef QTGLSCENEZOOMANDPANANIMATOR_H_
#define QTGLSCENEZOOMANDPANANIMATOR_H_
#include <QObject>
#include <tulip/GlSceneZoomAndPan.h>
namespace tlp {
class GlMainWidget;
/**
* \brief A convenient class to perform a Zoom and Pan animation on a GlMainWidget
*
* This class allows to perform a Zoom and Pan animation on the Tulip OpenGL scene associated with a GlMainWidget
* The algorithm used to perform this task is the one published in : Jarke J. van Wijk and Wim A.A. Nuij, "Smooth and efficient zooming and panning"
* For more details, the paper can be downloaded at the following url : www.win.tue.nl/~vanwijk/zoompan.pdf
*/
class TLP_QT_SCOPE QtGlSceneZoomAndPanAnimator : public QObject, public GlSceneZoomAndPan {
Q_OBJECT
public :
/**
* QtGlSceneZoomAndPanAnimator constructor
*
* \param glWidget The Tulip OpenGL widget on which to perform the animation
* * \param boundingBox the bounding box in scene coordinates on which the Tulip OpenGL scene has to be zoomed and panned.
* At the end of the animation, the viewport will be zoomed and centered on the content of that bounding box.
* \param optimalPath if true zooming and panning will be combined at each step of the animation, if false the scene will be zoomed out/in, panned then zoomed in/out
* \param layerName name of the layer zoom animation should be done on
* \param velocity animation speed parameter, adjust it according to your needs
* \param p zoom/pan trade-off parameter, adjust it according to your needs
*/
QtGlSceneZoomAndPanAnimator(GlMainWidget *glWidget, const BoundingBox &boundingBox, const double duration=1000., const std::string &layerName = "Main", const bool optimalPath = true, const double velocity = 1.1, const double p = sqrt(1.6));
/**
* Method to call to start the Zoom and Pan animation
*/
void animateZoomAndPan();
protected slots :
virtual void zoomAndPanAnimStepSlot(int animationStep);
protected :
GlMainWidget *glWidget;
double animationDurationMsec;
};
}
#endif /* QTGLSCENEZOOMANDPANANIMATOR_H_ */
|