fw4spl
visuVTKAdaptor/include/visuVTKAdaptor/SAxis.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2017.
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 #ifndef __VISUVTKADAPTOR_SAXIS_HPP__
8 #define __VISUVTKADAPTOR_SAXIS_HPP__
9 
10 #ifndef ANDROID
11 
12 #include "visuVTKAdaptor/config.hpp"
13 
14 #include <fwData/Color.hpp>
15 
16 #include <fwRenderVTK/IAdaptor.hpp>
17 #include <fwRenderVTK/vtk/fwVtkAxesActor.hpp>
18 
19 #include <vtkSmartPointer.h>
20 
21 namespace visuVTKAdaptor
22 {
23 
45 class VISUVTKADAPTOR_CLASS_API SAxis : public ::fwRenderVTK::IAdaptor
46 {
47 public:
48 
50 
51  VISUVTKADAPTOR_API SAxis() noexcept;
52  VISUVTKADAPTOR_API virtual ~SAxis() noexcept;
53 
58  VISUVTKADAPTOR_API static const ::fwCom::Slots::SlotKeyType s_UPDATE_VISIBILITY_SLOT;
59  typedef ::fwCom::Slot<void (bool)> UpdateVisibilitySlotType;
60 
62  VISUVTKADAPTOR_API void updateVisibility ( bool isVisible );
65 protected:
66 
67  VISUVTKADAPTOR_API void configuring() override;
68  VISUVTKADAPTOR_API void starting() override;
69  VISUVTKADAPTOR_API void updating() override;
70  VISUVTKADAPTOR_API void stopping() override;
71 
72  void buildPipeline();
73 
74  fwVtkAxesActor* m_axisActor;
75  double m_length;
76  bool m_labelOn;
77  vtkSmartPointer< vtkTransform> m_transformAxis;
78 
80  vtkSmartPointer< vtkActor> m_sphereActor;
82  bool m_sphereOn;
84  ::fwData::Color::sptr m_color;
85 
87  std::string m_xLabel;
88  std::string m_yLabel;
89  std::string m_zLabel;
90 };
91 
92 } // namespace visuVTKAdaptor
93 
94 #endif // ANDROID
95 
96 #endif // __VISUVTKADAPTOR_SAXIS_HPP__
The fwVtkAxesActor class is a specific and movable vtkAxesActor.
The namespace visuVTKAdaptor contains the list of adaptors available for the generic scene...
Namespace containing fw4spl communication tools.
Definition: DumpEditor.hpp:30
STL namespace.
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
Contains the representation of the data objects used in the framework.