uLib-0.2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
vtkMuonScatter.h
Go to the documentation of this file.
1 /*//////////////////////////////////////////////////////////////////////////////
2 // CMT Cosmic Muon Tomography project //////////////////////////////////////////
4 
5  Copyright (c) 2014, Universita' degli Studi di Padova, INFN sez. di Padova
6  All rights reserved
7 
8  Authors: Andrea Rigoni Garola < andrea.rigoni@pd.infn.it >
9 
10  ------------------------------------------------------------------
11  This library is free software; you can redistribute it and/or
12  modify it under the terms of the GNU Lesser General Public
13  License as published by the Free Software Foundation; either
14  version 3.0 of the License, or (at your option) any later version.
15 
16  This library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  Lesser General Public License for more details.
20 
21  You should have received a copy of the GNU Lesser General Public
22  License along with this library.
23 
25 
26 
27 
28 #ifndef VTKMUONSCATTER_H
29 #define VTKMUONSCATTER_H
30 
31 #include <vtkConfigure.h>
32 #include <vtkSmartPointer.h>
33 #include <vtkSphereSource.h>
34 #include <vtkAppendPolyData.h>
35 #include <vtkPolyDataMapper.h>
36 #include <vtkLineSource.h>
37 #include <vtkActor.h>
38 
39 #include <vtk3DWidget.h>
40 #include <vtkBoxWidget.h>
41 
42 #include <vtkRenderWindowInteractor.h>
43 
44 #include <vtkCommand.h>
45 #include <vtkTransform.h>
46 
47 #include "Math/Dense.h"
48 
49 #include "uLibVtkInterface.h"
50 #include "Detectors/MuonScatter.h"
51 
52 class vtkRenderWindowInteractor;
53 
54 namespace uLib {
55 namespace Vtk {
56 
57 class vtkMuonScatter : public Puppet, public Polydata {
58  typedef MuonScatter Content;
59 public:
60 
61  vtkMuonScatter(const MuonScatter &content);
62  vtkMuonScatter(MuonScatter &content);
63 
64  ~vtkMuonScatter();
65 
66  Content &GetContent();
67 
68  void PrintSelf(std::ostream &o) const;
69 
70  virtual vtkPolyData* GetPolyData() const;
71 
72  void AddPocaPoint(HPoint3f poca);
73 
74  HPoint3f GetPocaPoint();
75 
76  void vtkStartInteractive();
77 
78 protected:
79  void ConnectInteractor(vtkRenderWindowInteractor *interactor);
80 
81 private:
82  void InstallPipe();
83 
84  vtkMuonScatter::Content *m_Content;
85  vtkLineSource *m_LineIn;
86  vtkLineSource *m_LineOut;
87  vtkSphereSource *m_SpherePoca;
88  vtkPolyData *m_PolyData;
89 };
90 
91 } // vtk
92 } // uLib
93 
94 #endif // VTKMUONSCATTER_H