uLib-0.2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
uLibVtkViewer.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 ULIBVTKVIEWER_H
29 #define ULIBVTKVIEWER_H
30 
31 #include "uLibVtkInterface.h"
32 
33 
34 class vtkProp;
35 class vtk3DWidget;
36 class vtkCornerAnnotation;
37 class vtkRenderWindowInteractor;
38 class vtkRenderer;
39 
40 namespace uLib {
41 namespace Vtk {
42 
43 
44 template <class T>
45 class Tie {
46 public:
47  void DoAction() {
48  std::cout << "Tie::DoAction -> generic Tie does nothing\n";
49  }
50 };
51 
52 
53 class Viewer {
54 
55 public:
56  Viewer();
57  ~Viewer();
58 
59 
60  void AddPuppet(Puppet &prop);
61 
62  void RemovePuppet(Puppet &prop);
63 
64  void AddWidget(vtk3DWidget *widget);
65 
66  void Reset();
67 
68  void Start();
69 
70  vtkCornerAnnotation *GetAnnotation();
71 
72  vtkRenderer * GetRenderer();
73 
74  vtkRenderWindowInteractor * GetInteractor();
75 
76  void addProp(vtkProp *prop);
77 
78  void RemoveProp(vtkProp *prop);
79 
80 private:
81  class ViewerPimpl *d;
82 };
83 
84 template <> class Tie<Viewer>;
85 
86 
87 } // vtk
88 } // uLib
89 
90 #endif // ULIBVTKVIEWER_H