22 #ifndef GLSCENEZOOMANDPAN_H_
23 #define GLSCENEZOOMANDPAN_H_
25 #include <tulip/GlScene.h>
34 class TLP_GL_SCOPE AdditionalGlSceneAnimation {
42 void setNbAnimationSteps(
int nbAnimationSteps) {
43 this->nbAnimationSteps = nbAnimationSteps;
51 virtual void animationStep(
int animationStep) = 0;
66 class TLP_GL_SCOPE GlSceneZoomAndPan {
81 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));
88 void setAdditionalGlSceneAnimation(AdditionalGlSceneAnimation *additionalAnimation);
93 int getNbAnimationsStep()
const {
94 return nbAnimationSteps;
100 void setNbAnimationSteps(
const int nbAnimationSteps) {
101 this->nbAnimationSteps = nbAnimationSteps;
108 void zoomAndPanAnimationStep(
int animationStep);
113 Vector<int, 4> viewport;
114 int nbAnimationSteps;
117 Coord camCenterStart, camCenterEnd;
118 double w0, w1, u0, u1, b0, b1, r0, r1, S, sA, sB, wm;
119 AdditionalGlSceneAnimation *additionalAnimation;
120 float zoomAreaWidth, zoomAreaHeight;