LArSoft  v09_90_00
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  this->Connect("CloseWindow()", "evd::Display3DView", this, "CloseWindow()");
21 
22  // fDisplay3DPad->Draw();
23 
24  evdb::Canvas::fCanvas->Update();
25  }
26 
27  //......................................................................
29 
30  //......................................................................
32  {
33  delete this;
34  }
35 
36  //......................................................................
37  void Display3DView::Draw(const char* /*opt*/)
38  {
40  evdb::Canvas::fCanvas->Update();
41 
42  TVirtualViewer3D* viewer = fDisplay3DPad->Pad()->GetViewer3D("ogl");
43  viewer->PreferLocalFrame();
44  viewer->ResetCameras();
45  viewer->PadPaint(fDisplay3DPad->Pad());
46  }
47 
48 } // 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:26
LArSoft includes.
TPad * Pad()
Definition: DrawingPad.h:31
Display3DView(TGMainFrame *mf)
Display3DPad * fDisplay3DPad
Definition: Display3DView.h:31