Tulip  4.3.0
Better Visualization Through Research
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Groups Pages
tlp::QtGlSceneZoomAndPanAnimator Class Reference

#include <QtGlSceneZoomAndPanAnimator.h>

Inherits QObject, and tlp::GlSceneZoomAndPan.

Public Member Functions

 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))
 
void animateZoomAndPan ()
 
- Public Member Functions inherited from tlp::GlSceneZoomAndPan
 GlSceneZoomAndPan (GlScene *glScene, const BoundingBox &boundingBox, const std::string &layerName="Main", const int nbAnimationSteps=50, const bool optimalPath=true, const double p=sqrt(1.6))
 
int getNbAnimationsStep () const
 
void setAdditionalGlSceneAnimation (AdditionalGlSceneAnimation *additionalAnimation)
 
void setNbAnimationSteps (const int nbAnimationSteps)
 
void zoomAndPanAnimationStep (int animationStep)
 

Protected Slots

virtual void zoomAndPanAnimStepSlot (int animationStep)
 

Protected Attributes

double animationDurationMsec
 
GlMainWidgetglWidget
 
- Protected Attributes inherited from tlp::GlSceneZoomAndPan
AdditionalGlSceneAnimationadditionalAnimation
 
double b0
 
double b1
 
Coord camCenterEnd
 
Coord camCenterStart
 
Cameracamera
 
bool doZoomAndPan
 
int nbAnimationSteps
 
bool optimalPath
 
double p
 
double r0
 
double r1
 
double S
 
double sA
 
double sB
 
double u0
 
double u1
 
Vector< int, 4 > viewport
 
double w0
 
double w1
 
double wm
 
float zoomAreaHeight
 
float zoomAreaWidth
 

Detailed Description

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

Definition at line 38 of file QtGlSceneZoomAndPanAnimator.h.

Constructor & Destructor Documentation

tlp::QtGlSceneZoomAndPanAnimator::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) 
)

QtGlSceneZoomAndPanAnimator constructor

Parameters
glWidgetThe Tulip OpenGL widget on which to perform the animation
boundingBoxthe 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.
optimalPathif 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
layerNamename of the layer zoom animation should be done on
velocityanimation speed parameter, adjust it according to your needs
pzoom/pan trade-off parameter, adjust it according to your needs

Member Function Documentation

void tlp::QtGlSceneZoomAndPanAnimator::animateZoomAndPan ( )

Method to call to start the Zoom and Pan animation