LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
Display3DView.cxx
Go to the documentation of this file.
1 #include "TCanvas.h"
7 #include "TVirtualViewer3D.h"
10 
12 
13 namespace evd{
14 
15  //......................................................................
16  Display3DView::Display3DView(TGMainFrame* mf) : evdb::Canvas(mf)
17  {
19 
20  fDisplay3DPad = new Display3DPad("fDisplay3DPad","3D Display",
21  0.0, 0.0, 1.0, 1.0, "");
22 
23  this->Connect("CloseWindow()","evd::Display3DView",this,"CloseWindow()");
24 
25 // fDisplay3DPad->Draw();
26 
27  evdb::Canvas::fCanvas->Update();
28  }
29 
30  //......................................................................
32  {
33  }
34 
35  //......................................................................
37  {
38  delete this;
39  }
40 
41  //......................................................................
42  void Display3DView::Draw(const char* /*opt*/)
43  {
45  evdb::Canvas::fCanvas->Update();
46 
47  TVirtualViewer3D *viewer = fDisplay3DPad->Pad()->GetViewer3D("ogl");
48  viewer->PreferLocalFrame();
49  viewer->ResetCameras();
50  viewer->PadPaint(fDisplay3DPad->Pad());
51 
52  }
53 
54 }// 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:20
LArSoft includes.
TPad * Pad()
Definition: DrawingPad.h:37
Display3DView(TGMainFrame *mf)
Display3DPad * fDisplay3DPad
Definition: Display3DView.h:32