TView::SetWindow for parallel/perspective modes

Hi!

I would like to realize panning of the TGeoManager geometry view (standard mode, not OpenGL) in an external application which uses ROOT as a library.

In the perspective mode, everything works fine using this approach:

fCanvas->GetView()->GetWindow(centerX, centerY, viewSizeX, viewSizeY);
   ...adjusting centerX and centerY...
fCanvas->GetView()->SetWindow(centerX, centerY, viewSizeX, viewSizeY);

However, when the view mode is changed to “parallel”, this approach stops working: the view is keeping the same center.

Is there a bug in the SetWindow() method or was it planned this way?
If the latter, is there another way to make panning?

Note that by default OpenGL viewer has midButton-move for panning, which is not implemented for the standard view.

Thank you!

ROOT Version: 6.14/04
Platform: Ubuntu 18.04

May be @agheata has an idea., but can you send a small macro reproducing your problem ?

Hi,
Panning works only in perspective mode, not in orthographic (parallel) one, you can use the keys:

  • l,L - left
  • h,H - right
  • u,U - down
  • i,I - up
    Cheers

Hello Andrei,

The problem is I really need it in the parallel mode.
I am doing it in an external application, TCanvas is shown in a Qt window.

If you say there is really no way to do it, even with low level methods as that SetWindow() approach I use for the perspective mode, I can try to change the “viewport” on the canvas.

Thanks!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.