fw4spl
SCamera.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2018.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #pragma once
8 
9 #include "visuVTKAdaptor/config.hpp"
10 
11 #include <fwRenderVTK/IAdaptor.hpp>
12 
13 #include <vector>
14 
15 class vtkCommand;
16 class vtkPerspectiveTransform;
17 
18 namespace visuVTKAdaptor
19 {
20 
39 class VISUVTKADAPTOR_CLASS_API SCamera : public ::fwRenderVTK::IAdaptor
40 {
41 
42 public:
43 
45 
46  VISUVTKADAPTOR_API SCamera() noexcept;
47 
48  VISUVTKADAPTOR_API virtual ~SCamera() noexcept;
49 
50  VISUVTKADAPTOR_API void updateFromVtk();
51 
52 protected:
53 
54  VISUVTKADAPTOR_API void configuring() override;
55  VISUVTKADAPTOR_API void starting() override;
56  VISUVTKADAPTOR_API void updating() override;
57  VISUVTKADAPTOR_API void stopping() override;
58 
65  VISUVTKADAPTOR_API virtual KeyConnectionsMap getAutoConnections() const override;
66 
67 private:
68  vtkCommand* m_cameraCommand;
69  vtkPerspectiveTransform* m_transOrig;
70 
71  // the angular height of the camera view measured in degrees
72  double m_viewAngle;
73 
74 };
75 
76 } //namespace visuVTKAdaptor
This class is a helper to define the connections of a service and its data.
Definition: IService.hpp:454
The namespace visuVTKAdaptor contains the list of adaptors available for the generic scene...
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
This adaptor updates the camera position according to a matrix (and vice versa)
Definition: SCamera.hpp:39