Belle II Software development
SplitGLView.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <TQObject.h>
11#include <TEveProjectionManager.h>
12#include <TGLEmbeddedViewer.h>
13
14class TEveWindow;
15class TGPopupMenu;
16class TGStatusBar;
17class TGLPhysicalShape;
18
19namespace Belle2 {
24 class InfoWidget;
25
30 class SplitGLView : public TQObject {
31
32 public:
34 explicit SplitGLView();
36 virtual ~SplitGLView();
37
39 void itemClicked(TGListTreeItem* item, Int_t btn, Int_t x, Int_t y = 43);
41 void handleMenu(Int_t menuCommand);
43 void onClicked(TObject* obj);
45 void onMouseOver(TGLPhysicalShape* shape);
47 void updateCamera(int cameraAction);
49 void toggleOrthoRotate();
51 void toggleOrthoDolly();
53 void toggleStereo();
55 void toggleShowScale();
56
58 TEveProjectionManager* getRPhiMgr() const { return m_rphiManager; }
60 TEveProjectionManager* getRhoZMgr() const { return m_rhozManager; }
62 TGLEmbeddedViewer* getActiveGLViewer();
65
68 kGLPerspYOZ, kGLPerspXOZ, kGLPerspXOY, kGLXOY,
69 kGLXOZ, kGLZOY, kGLOrthoRotate, kGLOrthoDolly, kGLStereo,
70 kSceneUpdate, kSceneUpdateAll, kShowScale, kSaveGeometryExtract
71 };
72
73 private:
75 void setActiveViewer(TGLEmbeddedViewer* v);
76
77 TGLEmbeddedViewer* m_glViewer[3];
78 TEveWindow* m_window[3];
80 TEveProjectionManager* m_rphiManager;
81 TEveProjectionManager* m_rhozManager;
83 TGPopupMenu* m_cameraMenu;
84 TGPopupMenu* m_sceneMenu;
85 TGStatusBar* m_statusBar;
89
91 ClassDef(SplitGLView, 0)
92 };
94}
text-based info viewer showing DataStore contents.
Definition: InfoWidget.h:27
Responsible for arranging the GL viewers and providing related functionality.
Definition: SplitGLView.h:30
void onMouseOver(TGLPhysicalShape *shape)
show name of shape in status bar.
Definition: SplitGLView.cc:354
InfoWidget * m_infoWidget
text-based info viewer.
Definition: SplitGLView.h:88
void itemClicked(TGListTreeItem *item, Int_t btn, Int_t x, Int_t y=43)
handler for clicks inside GL viewer.
Definition: SplitGLView.cc:413
void toggleOrthoRotate()
toggle wether the active viewer may be rotated (not that useful for projections).
Definition: SplitGLView.cc:368
virtual ~SplitGLView()
destructor.
Definition: SplitGLView.cc:163
TEveWindow * m_window[3]
corresponding windows
Definition: SplitGLView.h:78
void toggleShowScale()
Toggle visibility of axes for projections.
Definition: SplitGLView.cc:396
TGPopupMenu * m_sceneMenu
'Scene' popup menu
Definition: SplitGLView.h:84
TEveProjectionManager * m_rhozManager
Rho-Z projection.
Definition: SplitGLView.h:81
TEveProjectionManager * getRhoZMgr() const
return Rho-Z projection manager.
Definition: SplitGLView.h:60
EMenuCommands
Which menu command was selected?
Definition: SplitGLView.h:67
TGPopupMenu * m_cameraMenu
'Camera' popup menu
Definition: SplitGLView.h:83
void updateCamera(int cameraAction)
change camera type, given one of EMenuCommands.
Definition: SplitGLView.cc:174
TGLEmbeddedViewer * getActiveGLViewer()
return TGLEmbeddedViewer that is active right now.
Definition: SplitGLView.cc:297
void onClicked(TObject *obj)
make current viewer active & show name of obj in status bar.
Definition: SplitGLView.cc:254
void toggleOrthoDolly()
Toggle state of the 'Ortho allow dolly' menu entry.
Definition: SplitGLView.cc:378
void toggleStereo()
Toggle stereo viewing for perspective viewer.
Definition: SplitGLView.cc:388
int m_activeViewer
selected viewer/window, or -1.
Definition: SplitGLView.h:79
SplitGLView()
constructor.
Definition: SplitGLView.cc:43
void setActiveViewer(TGLEmbeddedViewer *v)
set m_activeViewer and update UI accordingly.
Definition: SplitGLView.cc:314
TEveProjectionManager * m_rphiManager
R-Phi projection.
Definition: SplitGLView.h:80
void handleMenu(Int_t menuCommand)
menu item handler
Definition: SplitGLView.cc:207
InfoWidget * getInfoWidget() const
text-based info viewer.
Definition: SplitGLView.h:64
TGStatusBar * m_statusBar
status bar
Definition: SplitGLView.h:85
TEveProjectionManager * getRPhiMgr() const
return R-Phi projection manager.
Definition: SplitGLView.h:58
TGLEmbeddedViewer * m_glViewer[3]
GL viewers.
Definition: SplitGLView.h:77
Abstract base class for different kinds of events.