LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
Display3DView.cxx
Go to the documentation of this file.
7 #include "TCanvas.h"
8 #include "TVirtualViewer3D.h"
10 
11 namespace evd {
12 
13  //......................................................................
14  Display3DView::Display3DView(TGMainFrame* mf) : evdb::Canvas(mf)
15  {
17 
18  fDisplay3DPad = new Display3DPad("fDisplay3DPad", "3D Display", 0.0, 0.0, 1.0, 1.0);
19 
20  Connect("CloseWindow()", "evd::Display3DView", this, "CloseWindow()");
21 
22  evdb::Canvas::fCanvas->Update();
23  }
24 
25  //......................................................................
27  {
28  delete this;
29  }
30 
31  //......................................................................
32  void Display3DView::Draw(const char* /*opt*/)
33  {
35  evdb::Canvas::fCanvas->Update();
36 
37  TVirtualViewer3D* viewer = fDisplay3DPad->Pad()->GetViewer3D("ogl");
38  viewer->PreferLocalFrame();
39  viewer->ResetCameras();
40  viewer->PadPaint(fDisplay3DPad->Pad());
41  }
42 
43 } // end namespace
void Connect()
Make signal/slot connections.
Definition: Canvas.cxx:68
TCanvas * fCanvas
The ROOT drawing canvas.
Definition: Canvas.h:42
Manage all things related to colors for the event display.
Drawing pad showing a 3D rendering of the detector.
A view showing a 3D rendering of the detector.
void Draw(const char *opt="")
A drawing pad showing a 3D rendering of the detector.
Definition: Display3DPad.h:25
LArSoft includes.
TPad * Pad()
Definition: DrawingPad.h:30
Display3DView(TGMainFrame *mf)
Display3DPad * fDisplay3DPad
Definition: Display3DView.h:29