Belle II Software  release-05-02-19
SplitGLView.h
1 #ifndef SPLITGLVIEW_H
2 #define SPLITGLVIEW_H
3 
4 #include <TQObject.h>
5 #include <TEveProjectionManager.h>
6 #include <TGLEmbeddedViewer.h>
7 
8 class TEveWindow;
9 class TGPopupMenu;
10 class TGStatusBar;
11 class TGLPhysicalShape;
12 
13 namespace Belle2 {
18  class InfoWidget;
19 
24  class SplitGLView : public TQObject {
25 
26  public:
28  explicit SplitGLView();
30  virtual ~SplitGLView();
31 
33  void itemClicked(TGListTreeItem* item, Int_t btn, Int_t x, Int_t y = 43);
35  void handleMenu(Int_t menuCommand);
37  void onClicked(TObject* obj);
39  void onMouseOver(TGLPhysicalShape* shape);
41  void updateCamera(int cameraAction);
43  void toggleOrthoRotate();
45  void toggleOrthoDolly();
47  void toggleStereo();
49  void toggleShowScale();
50 
52  TEveProjectionManager* getRPhiMgr() const { return m_rphiManager; }
54  TEveProjectionManager* getRhoZMgr() const { return m_rhozManager; }
56  TGLEmbeddedViewer* getActiveGLViewer();
58  InfoWidget* getInfoWidget() const { return m_infoWidget; }
59 
62  kGLPerspYOZ, kGLPerspXOZ, kGLPerspXOY, kGLXOY,
63  kGLXOZ, kGLZOY, kGLOrthoRotate, kGLOrthoDolly, kGLStereo,
64  kSceneUpdate, kSceneUpdateAll, kShowScale, kSaveGeometryExtract
65  };
66 
67  private:
69  void setActiveViewer(TGLEmbeddedViewer* v);
70 
71  TGLEmbeddedViewer* m_glViewer[3];
72  TEveWindow* m_window[3];
74  TEveProjectionManager* m_rphiManager;
75  TEveProjectionManager* m_rhozManager;
77  TGPopupMenu* m_cameraMenu;
78  TGPopupMenu* m_sceneMenu;
79  TGStatusBar* m_statusBar;
83 
85  ClassDef(SplitGLView, 0)
86  };
88 }
89 #endif
Belle2::SplitGLView::m_cameraMenu
TGPopupMenu * m_cameraMenu
'Camera' popup menu
Definition: SplitGLView.h:77
Belle2::SplitGLView::m_sceneMenu
TGPopupMenu * m_sceneMenu
'Scene' popup menu
Definition: SplitGLView.h:78
Belle2::SplitGLView::toggleShowScale
void toggleShowScale()
Toggle visibility of axes for projections.
Definition: SplitGLView.cc:388
Belle2::SplitGLView::handleMenu
void handleMenu(Int_t menuCommand)
menu item handler
Definition: SplitGLView.cc:199
Belle2::SplitGLView::getRhoZMgr
TEveProjectionManager * getRhoZMgr() const
return Rho-Z projection manager.
Definition: SplitGLView.h:54
Belle2::SplitGLView::SplitGLView
SplitGLView()
constructor.
Definition: SplitGLView.cc:35
Belle2::SplitGLView::m_rhozManager
TEveProjectionManager * m_rhozManager
Rho-Z projection.
Definition: SplitGLView.h:75
Belle2::InfoWidget
text-based info viewer showing DataStore contents.
Definition: InfoWidget.h:20
Belle2::SplitGLView::~SplitGLView
virtual ~SplitGLView()
destructor.
Definition: SplitGLView.cc:155
Belle2::SplitGLView::m_infoWidget
InfoWidget * m_infoWidget
text-based info viewer.
Definition: SplitGLView.h:82
Belle2::SplitGLView::EMenuCommands
EMenuCommands
Which menu command was selected?
Definition: SplitGLView.h:61
Belle2::SplitGLView::onMouseOver
void onMouseOver(TGLPhysicalShape *shape)
show name of shape in status bar.
Definition: SplitGLView.cc:346
Belle2::SplitGLView::m_statusBar
TGStatusBar * m_statusBar
status bar
Definition: SplitGLView.h:79
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::SplitGLView::itemClicked
void itemClicked(TGListTreeItem *item, Int_t btn, Int_t x, Int_t y=43)
handler for clicks inside GL viewer.
Definition: SplitGLView.cc:405
Belle2::SplitGLView::m_rphiManager
TEveProjectionManager * m_rphiManager
R-Phi projection.
Definition: SplitGLView.h:74
Belle2::SplitGLView::getRPhiMgr
TEveProjectionManager * getRPhiMgr() const
return R-Phi projection manager.
Definition: SplitGLView.h:52
Belle2::SplitGLView::toggleStereo
void toggleStereo()
Toggle stereo viewing for perspective viewer.
Definition: SplitGLView.cc:380
Belle2::SplitGLView::getInfoWidget
InfoWidget * getInfoWidget() const
text-based info viewer.
Definition: SplitGLView.h:58
Belle2::SplitGLView::onClicked
void onClicked(TObject *obj)
make current viewer active & show name of obj in status bar.
Definition: SplitGLView.cc:246
Belle2::SplitGLView::getActiveGLViewer
TGLEmbeddedViewer * getActiveGLViewer()
return TGLEmbeddedViewer that is active right now.
Definition: SplitGLView.cc:289
Belle2::SplitGLView::updateCamera
void updateCamera(int cameraAction)
change camera type, given one of EMenuCommands.
Definition: SplitGLView.cc:166
Belle2::SplitGLView::toggleOrthoDolly
void toggleOrthoDolly()
Toggle state of the 'Ortho allow dolly' menu entry.
Definition: SplitGLView.cc:370
Belle2::SplitGLView::toggleOrthoRotate
void toggleOrthoRotate()
toggle wether the active viewer may be rotated (not that useful for projections).
Definition: SplitGLView.cc:360
Belle2::SplitGLView::m_window
TEveWindow * m_window[3]
corresponding windows
Definition: SplitGLView.h:72
Belle2::SplitGLView::m_glViewer
TGLEmbeddedViewer * m_glViewer[3]
GL viewers.
Definition: SplitGLView.h:71
Belle2::SplitGLView::setActiveViewer
void setActiveViewer(TGLEmbeddedViewer *v)
set m_activeViewer and update UI accordingly.
Definition: SplitGLView.cc:306
Belle2::SplitGLView
Responsible for arranging the GL viewers and providing related functionality.
Definition: SplitGLView.h:24
Belle2::SplitGLView::m_activeViewer
int m_activeViewer
selected viewer/window, or -1.
Definition: SplitGLView.h:73