Change camera rotation axes in Eve

Hi, after setting the starting orientation for the camera in my Eve application

  TEveManager* _MainWindow = gEve;
  _MainWindow->GetDefaultGLViewer()->CurrentCamera().RotateRad(0, -TMath::Pi()/2);
  _MainWindow->GetDefaultGLViewer()->CurrentCamera().RotateRad(TMath::Pi()/2-0.1, 0);
  _MainWindow->GetDefaultGLViewer()->CurrentCamera().Zoom(200, 0, 0); //eyeballed value

I now have the camera pointing in the direction of the y axis, with the z axis pointing up (see picture)

This is the desired view for my app when it is launched. The problem is that when I try to use the mouse to rotate the view, the rotation axes are kinda awkward.
Moving the mouse horizontally results in a rotation around the y axis (tilting the detector), while moving the mouse vertically results in a rotation around the x axis (which is fine).
I’d like to change the horizontal rotation behaviour so that the camera will rotate around the z axis (which is more intuitive in this kind of orientation), what would be the most effective way to do so?

ROOT Version (e.g. 6.12/06):
Platform, compiler (e.g. OSX 10.13.1, Apple LLVM version 9.0.0 (clang-900.0.39.2)):


Look at those:

I think you need kCameraPerspXOY (X and Y determine the “floor”).

Alternatively, you could enable arc ball rotation (key a in the viewer (see help)). You could set this by calling something like TGLViewer—>GetEventHandler()->SetArcBall(true);


Thanks, that made the trick :wink:


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