Overview     Modules     Class Hierarchy     Classes     Members  

tlp::GlSceneZoomAndPan Class Reference

A convenient class to perform Zoom and Pan animation on Tulip OpenGL scene. More...

#include <GlSceneZoomAndPan.h>

Collaboration diagram for tlp::GlSceneZoomAndPan:

List of all members.

Public Member Functions

Protected Attributes


Detailed Description

A convenient class to perform Zoom and Pan animation on Tulip OpenGL scene.

This class allow to perform a smooth and efficient zooming and panning on Tulip OpenGL scene. 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 Even if this class contains the whole Zoom and Pan implementation, it is not aimed to be used directly because its role is only to compute new camera parameters. Use the derived class QtGlSceneZoomAndPanAnimator in the tulip-qt library instead to perform the animation.


Constructor & Destructor Documentation

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) 
)

GlSceneZoomAndPan constructor

Parameters:
glScene the Tulip OpenGL scene on which to perform zooming and panning
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.
layerName The name of the layer animation should be done on
nbAnimationSteps the number of steps to perform during the animation
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
p zoom/pan trade-off parameter, adjust it according to your needs

Member Function Documentation

int tlp::GlSceneZoomAndPan::getNbAnimationsStep (  )  const [inline]

Method which return the number of animation steps

void tlp::GlSceneZoomAndPan::setAdditionalGlSceneAnimation ( AdditionalGlSceneAnimation additionalAnimation  ) 

Method to add an additional scene animation while zooming and panning

Parameters:
additionalAnimation The animation to add
void tlp::GlSceneZoomAndPan::setNbAnimationSteps ( const int  nbAnimationSteps  )  [inline]

Method to set the number of animation steps

void tlp::GlSceneZoomAndPan::zoomAndPanAnimationStep ( int  animationStep  ) 

Method which performs the zoom and pan animation. Its role is to compute new camera parameters at step animationStep. The scene is not redrawn with this method, you have to call the draw method on the associated GlScene object


Member Data Documentation

double tlp::GlSceneZoomAndPan::b0 [protected]
double tlp::GlSceneZoomAndPan::b1 [protected]
double tlp::GlSceneZoomAndPan::p [protected]
double tlp::GlSceneZoomAndPan::r0 [protected]
double tlp::GlSceneZoomAndPan::r1 [protected]
double tlp::GlSceneZoomAndPan::S [protected]
double tlp::GlSceneZoomAndPan::sA [protected]
double tlp::GlSceneZoomAndPan::sB [protected]
double tlp::GlSceneZoomAndPan::u0 [protected]
double tlp::GlSceneZoomAndPan::u1 [protected]
Vector<int, 4> tlp::GlSceneZoomAndPan::viewport [protected]
double tlp::GlSceneZoomAndPan::w0 [protected]
double tlp::GlSceneZoomAndPan::w1 [protected]
double tlp::GlSceneZoomAndPan::wm [protected]


Tulip Software by LaBRI Visualization Team    2001 - 2012